Bug #3126: irb/completione$B$Ge(BTypeError
http://redmine.ruby-lang.org/issues/show/3126
e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$BC4Ev<Te(B: Keiju Ishitsuka, e$B%+%F%4%je(B: lib, Target version:
1.9.2
ruby -v: ruby 1.9.2dev (2010-04-10 trunk 27284) [x86_64-linux]
irb/completion
e$B$rFI$_9~$s$G$$$k$H!Ve(Ba.e$B!W$d!Ve(BC::e$B!W$J$I$N8e$K%?%V%-!<$r2!$9$He(B
…/irb/completion.rb:137:in quote': can't convert NilClass to String (TypeError) e$B$de(B .../irb/completion.rb:87:in
quote’: can’t convert NilClass to String
(TypeError)
e$B$G=*N;$7$F$7$^$$$^$9!#e(B
e$B0J2<$N=$@5$GD>$k$h$&$G$9!#e(B
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb
index a345c23…e059bc4 100644
— a/lib/irb/completion.rb
+++ b/lib/irb/completion.rb
@@ -81,10 +81,10 @@ module IRB
candidates.grep(/^#{receiver}/).collect{|e| “::” + e}
when /^(((::)?[A-Z][^:.(])+)::?([^:.])$/
-
when /^([A-Z].*)::([^:.]+)*$/
- message = Regexp.quote($4)
- message = Regexp.quote($2)
begin
candidates = eval(“#{receiver}.constants.collect{|m| m.to_s}”,
bind)
candidates |= eval(“#{receiver}.methods.collect{|m| m.to_s}”, bind)
@@ -134,7 +134,7 @@ module IRB
when /^([^."].).([^.])$/variable
receiver = $1
- message = Regexp.quote($3)
-
message = Regexp.quote($2)
gv = eval(“global_variables”, bind).collect{|m| m.to_s}
lv = eval(“local_variables”, bind).collect{|m| m.to_s}