Issue #10184 has been updated by jeremyevans0 (Jeremy Evans).

Status changed from Open to Closed

This was fixed between Ruby 2.2 and 2.3:

```
$ irb22 
irb(main):001:0> def !; end
=> :!
irb(main):002:0> !
/usr/local/lib/ruby/2.2/irb/input-method.rb:151:in `gets': private method `!' called for false:FalseClass (NoMethodError)
        from /usr/local/lib/ruby/2.2/irb.rb:469:in `block (2 levels) in eval_input'
        from /usr/local/lib/ruby/2.2/irb.rb:623:in `signal_status'
        from /usr/local/lib/ruby/2.2/irb.rb:468:in `block in eval_input'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:188:in `call'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:188:in `buf_input'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:103:in `getc'
        from /usr/local/lib/ruby/2.2/irb/slex.rb:205:in `match_io'
        from /usr/local/lib/ruby/2.2/irb/slex.rb:75:in `match'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:282:in `token'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:264:in `lex'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:235:in `block (2 levels) in each_top_level_statement'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:231:in `loop'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:231:in `block in each_top_level_statement'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:230:in `catch'
        from /usr/local/lib/ruby/2.2/irb/ruby-lex.rb:230:in `each_top_level_statement'
        from /usr/local/lib/ruby/2.2/irb.rb:485:in `eval_input'
        from /usr/local/lib/ruby/2.2/irb.rb:395:in `block in start'
        from /usr/local/lib/ruby/2.2/irb.rb:394:in `catch'
        from /usr/local/lib/ruby/2.2/irb.rb:394:in `start'
        from /usr/local/bin/irb22:11:in `<main>'

$ irb23 
irb(main):001:0> def !; end
=> :!
irb(main):002:0> !
irb(main):003:0* nil
irb(main):004:0> 
=> nil
irb(main):004:0>
```

----------------------------------------
Bug #10184: irb terminates with no method error
https://bugs.ruby-lang.org/issues/10184#change-79234

* Author: sawa (Tsuyoshi Sawada)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.1.2
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
When I input the following lines in irb, the irb terminates.

~~~
$ irb
irb(main):001:0> def !; end
=> :!
irb(main):002:0> !
/usr/local/lib/ruby/2.1.0/irb/input-method.rb:153:in `gets': private method `!' called for false:FalseClass (NoMethodError)
...
$
~~~

A corresponding question is posted on StackOverflow at http://stackoverflow.com/questions/25572126/irb-terminates-with-no-method-error/25572313#25572313.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>