Feature #4222
Irb tab completion support for the valid (but rare) obj::method invocation syntax
Description
=begin
class MyC
def my_method
true
end
end
a = MyC.new
# This is a valid method invocation syntax (rare, but valid)
a::my_method # => true
But when you type in irb
a::
No tab-completion from irb.
a. is working well.
So, I think the small patch bellow could implement this feature.
Index: lib/irb/completion.rb
===================================================================
--- lib/irb/completion.rb (revisão 30417)
+++ lib/irb/completion.rb (cópia de trabalho)
@@ -131,7 +131,8 @@
# when /\?(.?[.]+)+).([.]*)$/
# when /(\?[.]+)+).([.]*)$/
- when /[."].*.([.]*)$/ +# when /[."].*.([.]*)$/
- when /[."].*(?:.|::)([.]*)$/ # variable receiver = $1 message = Regexp.quote($2)
I'm at
ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]
Ubuntu 10.04 amd64
=end
Files