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
This is because we treat the code coming in as a ScriptBody and as a script body we know we cannot raise from it. We can either solve this by adding Ruby code to front and back of the supplied script which will mess up backtraces but not require any changes to IR itself OR we will need to accommodate this as a special type of scope.
The text was updated successfully, but these errors were encountered:
Hmm my add ruby to front and back may be ok if we pass into parse with a linuenumber starting at -1 to ignore the first line from syntax errors and backtrace data. @headius also thought maybe this would be while gets; as part of first line of script which would mean we could not need to mess with linenumber. Maybe six of one or not since I don't know if linenumer has special meaning in our parser or not...
I tested this by running test/jruby/test_command_line_switches.rb which we seem to be no longer regularly running. It is heinously slow but we should contribute a cross-impl version of this to MRI since I can find no tests for -n in it.
So we have some outdated exceptions #2416 that need to be removed, but it uncovers some corners in IR that we missed:
In this case it should print 'a\n' and stop but we actually throw a LocalJumpError:
This is because we treat the code coming in as a ScriptBody and as a script body we know we cannot raise from it. We can either solve this by adding Ruby code to front and back of the supplied script which will mess up backtraces but not require any changes to IR itself OR we will need to accommodate this as a special type of scope.
The text was updated successfully, but these errors were encountered: