You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
irb(main):002* Module.newdoirb(main):003* class_evalFile.read("test/fixtures/typed_test.correct.rb")irb(main):004> end(evalat(irb):3):11:in`<module:TestEnum>': undefined method `sig' for module #<Module:0x000000011de4afc0>::TestEnum (NoMethodError) sig { params(val: Integer).returns(Symbol) } ^^^ from (eval at (irb):3):6:in `block in <top (required)>'from(irb):3:in`class_eval' from (irb):3:in `blockin <top(required)>' from (irb):2:in `initialize'from(irb):2:in`new' from (irb):2:in `<main>' from <internal:kernel>:187:in `loop'from/Users/dave/.gem/ruby/3.3.4/gems/irb-1.14.3/exe/irb:9:in`<top (required)>' from /Users/dave/.gem/ruby/3.3.4/bin/irb:25:in `load' from /Users/dave/.gem/ruby/3.3.4/bin/irb:25:in `<main>'irb(main):005>
I understand in some environments people extend T::Sig in Object so this is unnecessary, but we can't guarantee that to be the case. This evaled code should work in a vanilla Ruby environment.
The content you are editing has changed. Please copy your edits and refresh the page.
eval
ing generated Ruby withgenerate_types: true
results in an undefined method error:https://github.com/Shopify/protoboeuf/blob/f537118067e6f2b1472fb9beb206d110d1ecc96a/test/fixtures/typed_test.correct.rb
I understand in some environments people
extend T::Sig
inObject
so this is unnecessary, but we can't guarantee that to be the case. This evaled code should work in a vanilla Ruby environment.Tasks
The text was updated successfully, but these errors were encountered: