These are chat archives for opal/opal
Hi, I'm using opal-rails and upgraded from 0.8.1 to 0.9.0.
I have a global variable defined js.
On opal side, I access it by;
events = $$.gon.events
problem is; when using opal rails 0.9.0 it changes the structure of objects as following;
in 0.9.0 or any version above 0.8.1
how can i fix this issue?
I don't think you can get lexical scope programmatically, because that's defined in the parser. If you rewrote that code instead like this:
module Foo end class Foo::Whack end module Foo::Bar end class Foo::Bar::Baz def self.test(s) const_get s.to_s end def self.test1 test(Whack) end end
Both of your test methods would fail, but your lookup method would still work.