Project

General

Profile

Bug #14062

Updated by Eregon (Benoit Daloze) 6 months ago

~~~ ruby
puts "Here"
return 42 # or :foo, or any value
~~~

~~~
ruby test.rb
Here
~~~

Should it be a SyntaxError, as mentioned in https://bugs.ruby-lang.org/issues/4840#note-24 ?
It seems confusing to accept it silently, as one could expect the exit exact code to be affected by it (that should not be the case imho).

Discovered in https://github.com/ruby/spec/pull/530

Back