Issue #10184 has been updated by Robert A. Heiler.


Indeed. I have a similar error but different:



def !; end
# => :!

/usr/lib/ruby/2.1.0/irb/init.rb:250:in `rc_file': private method `!' called for #<Proc:0x00000001a19338@/usr/lib/ruby/2.1.0/irb/init.rb:273> (NoMethodError)


Somehow a Proc is called in my case.

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

* Author: Tsuyoshi Sawada
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* 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/