gavinlaking / vedeu

A framework written in Ruby for building GUI/TUI terminal/console applications.
Other
577 stars 35 forks source link

fix up delegated methods in distributed server, patch compatibility fix for Ruby 2.4 #392

Open damien-roche opened 6 years ago

damien-roche commented 6 years ago

This fixes an issue with the delegator methods in Ruby 2.4. Changes to Ruby introduced a compile which blows up delegated methods that eval:

iseq = RubyVM::InstructionSequence.compile("().#{method}", nil, nil, 0, false)

Change introduced here:

https://github.com/ruby/ruby/commit/2283d14cc9fefa278dfde02bdf8d84ce50cfe16f#diff-f8ad465135e9b25d06e71454b6e18317R6

I'm aware your other commit which fixes this removes $SAFE = 1, but I guess this allows you keep the safety. Not entirely sure of the implications of removing (perhaps isn't such a big deal). Sucks that CI is wailing :/