Open etiennebarrie opened 4 days ago
The confusing => nil
part is now hidden in master branch. https://github.com/ruby/irb/pull/972
Break command and ruby expression has a conflict.
# add a breakpoint to file "./while" on line 1
irb(main):001> break while 1
Changing the behavior will also make unexpected result.
irb(main):001> break file.rb 2
#=> SyntaxError, but I expect a message why break command is not available now
I think it is not easy to improve.
Description
When evaluating a Ruby expression that starts with
break
while not using the debugger, the behavior of the ruby code changes.The line evaluates to
nil
while I would expect to evaluate to:foo
like it does without IRB.Result of irb_info
Terminal Emulator
Terminal.app
Setting Files
Disabled using the -f command-line option.