-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
As a test, I tried the following
foo.rb:
class Foo
3.times |x|
puts x
end
endAnd none of the following work
$ ruby -r dead_end foo.rb
foo.rb:6: syntax error, unexpected end, expecting end-of-input
$ ruby -r dead_end -c foo.rb
foo.rb:6: syntax error, unexpected end, expecting end-of-inputI assume this is probably a Ruby ordering thing in that it parses your script before applying the requires, but it's very surprising.
If instead, I do this, it works fine.
bar.rb:
require "foo"Not sure if there's an actual fix that can be done if this is a Ruby core issue, but wanted to bring to your attention, particularly since one of your goals is eventually getting this into ruby core in a similar way to did_you_mean.
Metadata
Metadata
Assignees
Labels
No labels