Feature #4222
closedIrb 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
Updated by yugui (Yuki Sonoda) almost 14 years ago
=begin
Thank you, Abinoam.
On Wed, Dec 29, 2010 at 1:10 PM, Abinoam P. Marques Jr.
redmine@ruby-lang.org wrote:
Feature #4222: Irb tab completion support for the valid (but rare) obj::method invocation syntax
http://redmine.ruby-lang.org/issues/show/4222
Keiju, Is it an intended feature or just a lack of implementation?
--
Yuki Sonoda (Yugui)
yugui@yugui.jp
http://yugui.jp
=end
Updated by yugui (Yuki Sonoda) almost 14 years ago
- Category set to lib
- Status changed from Open to Assigned
- Assignee set to keiju (Keiju Ishitsuka)
- Priority changed from 3 to Normal
- Target version set to 1.9.3
=begin
=end
Updated by yugui (Yuki Sonoda) almost 14 years ago
=begin
石塚さん、
[ruby-core:33987]の件、現状が意図した仕様という訳でないならばマージしようかと思いますが、どうでしょうか。
---------- Forwarded message ----------
From: Abinoam P. Marques Jr. redmine@ruby-lang.org
Date: Wed, Dec 29, 2010 at 1:10 PM
Subject: [ruby-core:33987] [Ruby 1.9-Feature#4222][Open] Irb tab
completion support for the valid (but rare) obj::method invocation
syntax
To: ruby-core@ruby-lang.org
Feature #4222: Irb tab completion support for the valid (but rare)
obj::method 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 = 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
--
Yuki Sonoda (Yugui)
yugui@yugui.jp
http://yugui.jp
Attachment: tab-completion-for-rare-method-invocation-syntax.patch
=end
Updated by keiju (Keiju Ishitsuka) almost 14 years ago
=begin
けいじゅ@いしつかです.
Yugui yugui@yugui.jp wrote:
石塚さん、
どもです.
[ruby-core:33987]の件、現状が意図した仕様という訳でないならばマージ
しようかと思いますが、どうでしょうか。
これで良いような気もしますが, ちょっと微妙なのでもうちょっと待ってくだ
さい. :: と . って微妙に振る舞いが違うようなんですよねぇ...
__
---------------------------------------------------->> 石塚 圭樹 <<---
---------------------------------->> e-mail: keiju@ishitsuka.com <<---
=end
Updated by keiju (Keiju Ishitsuka) almost 14 years ago
=begin
けいじゅ@いしつかです.
In [ruby-dev:43049] the message: "[ruby-dev:43049] Re: Fwd:
[ruby-core:33987] [Ruby 1.9-Feature#4222][Open] Irb tab completion
support for the valid (but rare) obj::method invocation syntax", on
Jan/17 13:27(JST) keiju ISHITSUKA writes:
けいじゅ@いしつかです.
[ruby-core:33987]の件、現状が意図した仕様という訳でないならばマージ
しようかと思いますが、どうでしょうか。これで良いような気もしますが, ちょっと微妙なのでもうちょっと待ってくだ
さい. :: と . って微妙に振る舞いが違うようなんですよねぇ...
対応しました.
var::xxx は varがmoduleでxxxが大文字から始まっていると定数参照になるの
でその対応と, 変数以外の xxx:: に対応しました.
__
---------------------------------------------------->> 石塚 圭樹 <<---
---------------------------------->> e-mail: keiju@ishitsuka.com <<---
=end
Updated by keiju (Keiju Ishitsuka) over 13 years ago
- Status changed from Assigned to Closed
これはすでに対応していました。