[前][次][番号順一覧][スレッド一覧]

ruby-changes:20247

From: keiju <ko1@a...>
Date: Thu, 30 Jun 2011 00:08:48 +0900 (JST)
Subject: [ruby-changes:20247] keiju:r32295 (trunk): * lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].

keiju	2011-06-30 00:08:41 +0900 (Thu, 30 Jun 2011)

  New Revision: 32295

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32295

  Log:
    * lib/irb/completion.rb: complate correctry string literal. fix [Bug #1145].

  Modified files:
    trunk/ChangeLog
    trunk/lib/irb/completion.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 32294)
+++ ChangeLog	(revision 32295)
@@ -1,3 +1,8 @@
+Thu Jun 30 00:03:20 2011  Keiju Ishitsuka  <keiju@i...>
+
+	* lib/irb/completion.rb: complate correctry string literal. fix
+	  [Bug #1145].
+
 Wed Jun 29 23:42:51 2011  Tadayoshi Funaba  <tadf@d...>
 
 	* ext/date/date_core.c: avoided using timev.
Index: lib/irb/completion.rb
===================================================================
--- lib/irb/completion.rb	(revision 32294)
+++ lib/irb/completion.rb	(revision 32295)
@@ -39,6 +39,14 @@
 #      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 @@
 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]