aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 15:08:41 +0000
committerkeiju <keiju@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-29 15:08:41 +0000
commitf1ce1f1dbfb39637c0e3e2c50304fed03c582f6e (patch)
treec0238d833f1d28e8c57f5f90026eaed2d22ac71c
parent23658b355c1c62771945cfa86e098ba8dd618779 (diff)
downloadruby-f1ce1f1dbfb39637c0e3e2c50304fed03c582f6e.tar.gz
* lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/irb/completion.rb11
2 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 8aa21e112a..d0d7972d4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 30 00:03:20 2011 Keiju Ishitsuka <keiju@ishitsuka.com>
+
+ * lib/irb/completion.rb: complate correctry string literal. fix
+ [Bug #1145].
+
Wed Jun 29 23:42:51 2011 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_core.c: avoided using timev.
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index 3f161a2ff7..54e6526957 100644
--- a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -39,6 +39,14 @@ module IRB
# puts "input: #{input}"
case input
+ when /^((["'`]).*\2)\.([^.]*)$/
+ # String
+ receiver = $1
+ message = $3
+
+ candidates = String.instance_methods.collect{|m| m.to_s}
+ select_message(receiver, message, candidates)
+
when /^(\/[^\/]*\/)\.([^.]*)$/
# Regexp
receiver = $1
@@ -214,7 +222,8 @@ module IRB
end
if Readline.respond_to?("basic_word_break_characters=")
- Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
+# Readline.basic_word_break_characters= " \t\n\"\\'`><=;|&{("
+ Readline.basic_word_break_characters= " \t\n`><=;|&{("
end
Readline.completion_append_character = nil
Readline.completion_proc = IRB::InputCompletor::CompletionProc