* lib/irb/completion.rb: treat rightly comletion for symbol on irb
[Bug #7632]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cdabc58f8e
commit
b0767cf8c0
@ -1,3 +1,8 @@
|
|||||||
|
Sat Dec 29 21:57:11 2012 Keiju Ishitsuka <keiju@ishitsuka.com>
|
||||||
|
|
||||||
|
* lib/irb/completion.rb: treat rightly comletion for symbol on irb
|
||||||
|
[Bug #7632].
|
||||||
|
|
||||||
Sat Dec 29 21:51:30 2012 Shugo Maeda <shugo@ruby-lang.org>
|
Sat Dec 29 21:51:30 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* ext/curses/curses.c (window_cury, window_curx, window_maxy,
|
* ext/curses/curses.c (window_cury, window_curx, window_maxy,
|
||||||
|
@ -44,7 +44,7 @@ module IRB
|
|||||||
when /^((["'`]).*\2)\.([^.]*)$/
|
when /^((["'`]).*\2)\.([^.]*)$/
|
||||||
# String
|
# String
|
||||||
receiver = $1
|
receiver = $1
|
||||||
message = $3
|
message = Regexp.quote($3)
|
||||||
|
|
||||||
candidates = String.instance_methods.collect{|m| m.to_s}
|
candidates = String.instance_methods.collect{|m| m.to_s}
|
||||||
select_message(receiver, message, candidates)
|
select_message(receiver, message, candidates)
|
||||||
@ -79,7 +79,7 @@ module IRB
|
|||||||
if Symbol.respond_to?(:all_symbols)
|
if Symbol.respond_to?(:all_symbols)
|
||||||
sym = $1
|
sym = $1
|
||||||
candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name}
|
candidates = Symbol.all_symbols.collect{|s| ":" + s.id2name}
|
||||||
candidates.grep(/^#{sym}/)
|
candidates.grep(/^#{Regexp.quote(sym)}/)
|
||||||
else
|
else
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user