From: "Abinoam P. Marques Jr." Date: 2010-12-29T13:10:13+09:00 Subject: [ruby-core:33987] [Ruby 1.9-Feature#4222][Open] Irb tab completion support for the valid (but rare) obj::method invocation syntax --mimepart_4d1ab4a12d8cc_3346b7dbb2a6314 Content-Type: text/plain Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline Feature #4222: Irb tab completion support for the valid (but rare) obj::m= ethod invocation syntax http://redmine.ruby-lang.org/issues/show/4222 Author: Abinoam P. Marques Jr. Status: Open, Priority: Low class MyC def my_method true end end a =3D MyC.new # This is a valid method invocation syntax (rare, but valid) a::my_method # =3D> 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- lib/irb/completion.rb (revis=C3=A3o 30417) +++ lib/irb/completion.rb (c=C3=B3pia de trabalho) @@ -131,7 +131,8 @@ = # when /^(\$?(\.?[^.]+)+)\.([^.]*)$/ # when /^((\.?[^.]+)+)\.([^.]*)$/ - when /^([^."].*)\.([^.]*)$/ +# when /^([^."].*)\.([^.]*)$/ + when /^([^."].*)(?:\.|::)([^.]*)$/ # variable receiver =3D $1 message =3D Regexp.quote($2) I'm at = ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] Ubuntu 10.04 amd64 ---------------------------------------- http://redmine.ruby-lang.org --mimepart_4d1ab4a12d8cc_3346b7dbb2a6314 Content-Type: text/x-patch; name=tab-completion-for-rare-method-invocation-syntax.patch Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename=tab-completion-for-rare-method-invocation-syntax.patch SW5kZXg6IGxpYi9pcmIvY29tcGxldGlvbi5yYgo9PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09Ci0tLSBsaWIvaXJiL2NvbXBsZXRpb24ucmIJKHJldmlzw6NvIDMw NDE3KQorKysgbGliL2lyYi9jb21wbGV0aW9uLnJiCShjw7NwaWEgZGUgdHJh YmFsaG8pCkBAIC0xMzEsNyArMTMxLDggQEAKIAogIyAgICAgIHdoZW4gL14o XCQ/KFwuP1teLl0rKSspXC4oW14uXSopJC8KICMgICAgICB3aGVuIC9eKChc Lj9bXi5dKykrKVwuKFteLl0qKSQvCi0gICAgICB3aGVuIC9eKFteLiJdLiop XC4oW14uXSopJC8KKyMgICAgICB3aGVuIC9eKFteLiJdLiopXC4oW14uXSop JC8KKyAgICAgIHdoZW4gL14oW14uIl0uKikoPzpcLnw6OikoW14uXSopJC8K IAkjIHZhcmlhYmxlCiAJcmVjZWl2ZXIgPSAkMQogCW1lc3NhZ2UgPSBSZWdl eHAucXVvdGUoJDIpCg== --mimepart_4d1ab4a12d8cc_3346b7dbb2a6314--