# Irb completion

**URL:** <https://www.ruby-forum.com/t/irb-completion/98695>\
**Category:** Development\
**Created:** [July 17, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/irb-completion/98695 "2006-07-17T17:09:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 17, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/1 "2006-07-17T17:09:30Z")

</div>

e$B$U$J$P$G$9!#e(B

e$BJd40$N:]$K!"e(B9e0 e$B$O?tCM$HG’\<1$5$l$k$h$&$G$9$,!"e(B9E0  
e$B$O$=$&$J$i$J$$$h$&$Ge(B  
e$B$9!#e(B-9  
e$B$N$h$&$J$b$N$b!#2DG=$J$i?tCM$H$7$FG’\<1$5$l$k$HJXMx$@$H;W$$$^$9!#e(B

1. e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<$K$J$j$^$9e(B (e$B$?$V$se(B  
8e$B?J?t$H$7e(B  
e$B$F8m$j$G$"$k$?$ae(B)e$B!#e(B10  
e$B?J?t0J30$K$D$$$F$NG[N8$O$J$5$=$&$G$9!#e(B

e$B$=$l$+$i!"e(Bruby 1.9 e$B$G!"e(BRational(0).  
e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<e(B  
e$B$K$J$j$^$9!#e(B1.8 e$B$G$OBg\>fIW$G$9!#e(B

/usr/local/ruby19/lib/ruby/1.9/irb/completion.rb:140: undefined local  
variable or method `m' for IRB::InputCompletor:Module (NameError) from /usr/local/ruby19/lib/ruby/1.9/irb/input-method.rb:99 from /usr/local/ruby19/lib/ruby/1.9/irb/input-method.rb:99:in`IRB::ReadlineInputMethod#gets’  
from /usr/local/ruby19/lib/ruby/1.9/irb.rb:132:in  
`IRB::Irb#eval_input' from /usr/local/ruby19/lib/ruby/1.9/irb.rb:259:in`signal\_status’  
from /usr/local/ruby19/lib/ruby/1.9/irb.rb:131:in  
`IRB::Irb#eval_input' from /usr/local/ruby19/lib/ruby/1.9/irb/ruby-lex.rb:189 from /usr/local/ruby19/lib/ruby/1.9/irb/ruby-lex.rb:189:in`buf\_input’  
from /usr/local/ruby19/lib/ruby/1.9/irb/ruby-lex.rb:104:in  
`RubyLex#getc' ... 7 levels... from /usr/local/ruby19/lib/ruby/1.9/irb.rb:146:in`IRB::Irb#eval\_input’  
from /usr/local/ruby19/lib/ruby/1.9/irb.rb:70:in `IRB#start' from /usr/local/ruby19/lib/ruby/1.9/irb.rb:69:in`IRB#start’  
from /usr/local/bin/irb19:13

ruby 1.9.0 (2006-07-17) [i386-freebsd5.4]

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/2 "2006-07-18T17:02:03Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29038] the message: “[ruby-dev:29038] irb completion”, on  
Jul/18 00:08(JST) Tadayoshi F. writes:

> e$B$U$J$P$G$9!#e(B
> 
> e$BJd40$N:]$K!"e(B9e0 e$B$O?tCM$HG’\<1$5$l$k$h$&$G$9$,!"e(B9E0 e$B$O$=$&$J$i$J$$$h$&$Ge(B  
> e$B$9!#e(B-9 e$B$N$h$&$J$b$N$b!#2DG=$J$i?tCM$H$7$FG’\<1$5$l$k$HJXMx$@$H;W$$$^$9!#e(B
> 
> 1. e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<$K$J$j$^$9e(B (e$B$?$V$se(B 8e$B?J?t$H$7e(B  
> e$B$F8m$j$G$"$k$?$ae(B)e$B!#e(B10 e$B?J?t0J30$K$D$$$F$NG[N8$O$J$5$=$&$G$9!#e(B

e$B$3$NJU$j$K$D$$$F$OBP1~$7$^$7$?e(B(e$B%A%’%C%/%$%s$O$7$F$$$^$;$se(B)

> e$B$=$l$+$i!"e(Bruby 1.9 e$B$G!"e(BRational(0). e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<e(B  
> e$B$K$J$j$^$9!#e(B1.8 e$B$G$OBg\>fIW$G$9!#e(B

e$B$3$l$J$s$G$9$,e(B, irb/completion.rb e$B$Ne(B  
1.10/1.8.2.2(e$B$D$^$je(BRuby1.8e$B$He(B  
Ruby1.9e$B$N:G?7HGe(B) e$B$GJQ$o$C$F$$$k$N$G$9$,e(B, e$B$J$s$Ge(B,  
e$B$3$&$$$&JQ99$r$9$k$3e(B  
e$B$H$K$J$C$?$N$G$7$g$&e(B? e$BJQ99$N0U?^$,$o$+$i$J$$$N$G$9$,e(B?  
e$B$H$$$&$+e(B, e$B8B$j$Je(B  
e$B$/0UL#$N$J$$F0:n$K$J$C$F$$$k$H;W$&$N$G$9$,e(B…  
e$B$I$3$+$G$3$&$$$&5DO@$,$"$Ce(B  
e$B$?$N$G$7$g$&$+e(B?

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/3 "2006-07-18T17:19:25Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29063] Re: irb completion”  
on Tue, 18 Jul 2006 23:59:01 +0900, removed\_email\_address@domain.invalid  
(e$B@PDM7=\<ye(B) writes:

|\>080. e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<$K$J$j$^$9e(B (e$B$?$V$se(B 8e$B?J?t$H$7e(B  
|\>e$B$F8m$j$G$"$k$?$ae(B)e$B!#e(B10 e$B?J?t0J30$K$D$$$F$NG[N8$O$J$5$=$&$G$9!#e(B  
|  
|e$B$3$NJU$j$K$D$$$F$OBP1~$7$^$7$?e(B(e$B%A%'%C%/%$%s$O$7$F$$$^$;$se(B)

e$B$7$F$b$i$C$F$bNI$$$G$9$+!)e(B

|\>e$B$=$l$+$i!"e(Bruby 1.9 e$B$G!“e(BRational(0). e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<e(B  
|\>e$B$K$J$j$^$9!#e(B1.8 e$B$G$OBg\>fIW$G$9!#e(B  
|  
|e$B$3$l$J$s$G$9$,e(B, irb/completion.rb e$B$Ne(B 1.10/1.8.2.2(e$B$D$^$je(BRuby1.8e$B$He(B  
|Ruby1.9e$B$N:G?7HGe(B) e$B$GJQ$o$C$F$$$k$N$G$9$,e(B, e$B$J$s$Ge(B, e$B$3$&$$$&JQ99$r$9$k$3e(B  
|e$B$H$K$J$C$?$N$G$7$g$&e(B? e$BJQ99$N0U?^$,$o$+$i$J$$$N$G$9$,e(B? e$B$H$$$&$+e(B, e$B8B$j$Je(B  
|e$B$/0UL#$N$J$$F0:n$K$J$C$F$$$k$H;W$&$N$G$9$,e(B… e$B$I$3$+$G$3$&$$$&5DO@$,$”$Ce(B  
|e$B$?$N$G$7$g$&$+e(B?

1.10 e$B$NJQ99$@$He(B10e$BF|A0$G$9$+!#e(B

Sun Jul 9 07:58:48 2006 Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

```
* lib/irb/completion.rb: fixed a crasher when completing against
  an unnamed class/module.

```

e$B$H$$$&JQ99$r5v2D$7$?3P$($,$"$j$^$9!#MW$9$k$KL\>A0$N$J$$%/%i%9e(B  
e$B$H$+$@$HMn$A$A$c$&$C$F$3$H$i$7$$$G$9!#e(B

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 5:32pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/4 "2006-07-18T17:32:42Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29065] the message: “[ruby-dev:29065] Re: irb completion”,  
on Jul/19 00:23(JST)  
e$B@PDM7=\<ye(B writes:

> e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

> > - lib/irb/completion.rb: fixed a crasher when completing against  
> > an unnamed class/module.
> > 
> > e$B$H$$$&JQ99$r5v2D$7$?3P$($,$"$j$^$9!#MW$9$k$KL\>A0$N$J$$%/%i%9e(B  
> > e$B$H$+$@$HMn$A$A$c$&$C$F$3$H$i$7$$$G$9!#e(B
> 
> e$B$"e(B. e$B$J$k$[$Ie(B. e$BN;2r$G$9e(B.  
> e$B$3$A$i$be(B, e$B0U?^DL$j$KF0:n$9$k$h$&$K$7$^$9e(B.

e$B$H$\*$b$C$?$N$G$9$,e(B, e$BLdBj$J$/F0:n$7$F$$$k$H;W$&$N$G$9$,e(B?  
e$B85$N%3!\<%Ie(B:

```
  # func1.func2
  candidates = []
  ObjectSpace.each_object(Module){|m|
    next if m.name != "IRB::Context" and
      /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name
    candidates.concat m.instance_methods
  }
  candidates.sort!
  candidates.uniq!

```

me$B$,L5L\>$G$bNc30$K$J$k$3$H$O$J$$$H;W$&$N$G$9$,e(B?

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/5 "2006-07-18T17:26:32Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29064] the message: “[ruby-dev:29064] Re: irb completion”,  
on Jul/19 00:15(JST)  
Yukihiro M. writes:

> e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

> |\>080. e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<$K$J$j$^$9e(B (e$B$?$V$se(B 8e$B?J?t$H$7e(B  
> |\>e$B$F8m$j$G$"$k$?$ae(B)e$B!#e(B10 e$B?J?t0J30$K$D$$$F$NG[N8$O$J$5$=$&$G$9!#e(B  
> |e$B$3$NJU$j$K$D$$$F$OBP1~$7$^$7$?e(B(e$B%A%'%C%/%$%s$O$7$F$$$^$;$se(B)
> 
> e$B$7$F$b$i$C$F$bNI$$$G$9$+!)e(B

e$BN;2re(B.

> |\>e$B$=$l$+$i!"e(Bruby 1.9 e$B$G!"e(BRational(0). e$B$HBG$A$3$s$GJd40$7$h$&$H$9$k$H%(%i!\<e(B  
> |\>e$B$K$J$j$^$9!#e(B1.8 e$B$G$OBg\>fIW$G$9!#e(B

> 1.10 e$B$NJQ99$@$He(B10e$BF|A0$G$9$+!#e(B

e$B$G$9$Me(B. e$B7k9=:G6a$G$9$Me(B.

> Sun Jul 9 07:58:48 2006 Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> - lib/irb/completion.rb: fixed a crasher when completing against  
> an unnamed class/module.
> 
> e$B$H$$$&JQ99$r5v2D$7$?3P$($,$"$j$^$9!#MW$9$k$KL\>A0$N$J$$%/%i%9e(B  
> e$B$H$+$@$HMn$A$A$c$&$C$F$3$H$i$7$$$G$9!#e(B

e$B$"e(B. e$B$J$k$[$Ie(B. e$BN;2r$G$9e(B.  
e$B$3$A$i$be(B, e$B0U?^DL$j$KF0:n$9$k$h$&$K$7$^$9e(B.

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 5:42pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/6 "2006-07-18T17:42:41Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29066] Re: irb completion”  
on Wed, 19 Jul 2006 00:30:53 +0900, removed\_email\_address@domain.invalid  
(e$B@PDM7=\<ye(B) writes:

|e$B$H$\*$b$C$?$N$G$9$,e(B, e$BLdBj$J$/F0:n$7$F$$$k$H;W$&$N$G$9$,e(B?  
|e$B85$N%3!\<%Ie(B:  
|  
| # func1.func2  
| candidates = []  
| ObjectSpace.each\_object(Module){|m|  
| next if m.name != “IRB::Context” and  
| /^(IRB|SLex|RubyLex|RubyToken)/ =~ m.name  
| candidates.concat m.instance\_methods  
| }  
| candidates.sort!  
| candidates.uniq!  
|  
|me$B$,L5L\>$G$bNc30$K$J$k$3$H$O$J$$$H;W$&$N$G$9$,e(B?

e$B$=$&$G$9$M!#L5L\>$N$H$-$K$ONc30$,=P$k$H8m2r$7$F$?$N$+$b$7$l$^e(B  
e$B$;$s$M!#La$7$F$/$@$5$C$F9=$$$^$;$s!#$\*\<j?t$+$1$^$7$?!#e(B

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 5:58am UTC](https://www.ruby-forum.com/t/irb-completion/98695/7 "2006-07-19T05:58:11Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29070] the message: “[ruby-dev:29070] Re: irb  
completion”, on Jul/19 03:27(JST) Ryan D. writes:

> e$B;d$N0U;We(B:  
> (e$BCfN,e(B)

Ryane$B$5$s$OF|K\8le(BOKe$B$J$s$G$9$Me(B!?

> completion.rb:141: [BUG] Bus Error  
> ruby 1.8.5 (2006-06-27) [i686-darwin8.7.1]

e$B$H$$$&$3$H$Ge(B, ruby1.8e$B7O$G$be(Bruby1.9e$B7O$G$be(B  
[i686-darwin8.7.1] e$B$G$Oe(BBus  
Error e$B$,H/@8$9$k$N$Ge(B,  
completion.rbe$B$K%Q%C%A$rEv$F$?$C$F$3$H$G$9$+e(B.

e$B$G$be(B, e$B$3$NLdBj$Oe(B, bus error e$B$H$$$&$3$H$Ge(B,  
completion.rbe$B$GBP=h$9$Y$-Lde(B  
e$BBj$H$$$&$h$j$Oe(B,  
Rubye$BK\BN$GBP=h$9$Y$-LdBj$J$N$G$=$A$i$GBP1~$9$Y$-$b$N$@e(B  
e$B$H;W$$$^$9e(B.

e$B$H$$$&$3$H$Ge(B, e$B$^$D$b$H$5$s$h$m$7$/$\*4j$$$7$^$9$Me(B.

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 18, 2006, 8:29pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/8 "2006-07-18T20:29:12Z")

</div>

On Jul 18, 2006, at 8:15 AM, Yukihiro M. wrote:

> 1.10 e$B$NJQ99$@$He(B10e$BF|A0$G$9$+!#e(B
> 
> Sun Jul 9 07:58:48 2006 Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
> 
> - lib/irb/completion.rb: fixed a crasher when completing against  
> an unnamed class/module.
> 
> e$B$H$$$&JQ99$r5v2D$7$?3P$($,$"$j$^$9!#MW$9$k$KL\>A0$N$J$$%/%i%9e(B  
> e$B$H$+$@$HMn$A$A$c$&$C$F$3$H$i$7$$$G$9!#e(B

e$B;d$N0U;We(B:

% cd ruby18  
% cvs up -r1.8.2.1 lib/irb/completion.rb  
% ./miniruby ./runruby.rb --extout=.ext – ./bin/irb  
irb(main):001:0\> a=[]  
=\> []  
irb(main):002:0\> a.to\_a.  
Display all 512 possibilities? (y or n) n  
irb(main):003:0\> def Date.name(explode);end  
=\> nil  
irb(main):004:0\> a.to\_a./Users/ryan/Work/cvs/ruby-lang/ruby18/lib/irb/  
completion.rb:141: [BUG] Bus Error  
ruby 1.8.5 (2006-06-27) [i686-darwin8.7.1]

Abort trap  
% cvs up -Ar ruby\_1\_8 lib/irb/completion.rb  
P lib/irb/completion.rb  
% ./miniruby ./runruby.rb --extout=.ext – ./bin/irb  
irb(main):001:0\> require ‘date’; def Date.name(explode);end; a=[]  
=\> []  
irb(main):002:0\> a.to\_a.  
Display all 643 possibilities? (y or n) ^c

% cd …/ruby  
% cvs up -r 1.9 lib/irb/completion.rb  
% ./miniruby ./runruby.rb --extout=.ext – ./bin/irb  
irb(main):001:0\> require ‘date’; def Date.name(explode);end; a=[]  
=\> []  
irb(main):002:0\> a.to\_a./Users/ryan/Work/cvs/ruby-lang/ruby/  
lib/irb/completion.rb:141: [BUG] Bus Error  
ruby 1.9.0 (2006-07-09) [i686-darwin8.7.1]

Abort trap  
% cvs up -A lib/irb/completion.rb  
P lib/irb/completion.rb  
% ./miniruby ./runruby.rb --extout=.ext – ./bin/irb  
irb(main):001:0\> require ‘date’; def Date.name(explode);end; a=[]  
=\> []  
irb(main):002:0\> a.to\_a./Users/ryan/Work/cvs/ruby-lang/ruby/  
lib/irb/completion.rb:140: [BUG] Bus Error  
ruby 1.9.0 (2006-07-09) [i686-darwin8.7.1]

Abort trap

DOH!

# % cvs diff -du lib/irb/completion.rb Index: lib/irb/completion.rb

RCS file: /src/ruby/lib/irb/completion.rb,v  
retrieving revision 1.10  
diff -d -u -r1.10 completion.rb  
— lib/irb/completion.rb 8 Jul 2006 23:17:50 -0000 1.10  
+++ lib/irb/completion.rb 18 Jul 2006 18:22:16 -0000  
@@ -137,8 +137,8 @@  
else  
# func1.func2  
candidates = []

- 

```
     name = m.name rescue ""
     ObjectSpace.each_object(Module){|m|

```

- 

```
       name = m.name rescue ""
       next if name != "IRB::Context" and
         /^(IRB|SLex|RubyLex|RubyToken)/ =~ name
       candidates.concat m.instance_methods(false)

```

% ./miniruby ./runruby.rb --extout=.ext – ./bin/irb  
irb(main):001:0\> require ‘date’; def Date.name(explode);end; a=[]  
=\> []  
irb(main):002:0\> a.to\_a.  
Display all 585 possibilities? (y or n)

e$B;DG0e(B!!

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 9:33am UTC](https://www.ruby-forum.com/t/irb-completion/98695/9 "2006-07-19T09:33:43Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29071] Re: irb completion”  
on Wed, 19 Jul 2006 12:54:43 +0900, removed\_email\_address@domain.invalid  
(e$B@PDM7=\<ye(B) writes:

|Ryane$B$5$s$OF|K\8le(BOKe$B$J$s$G$9$Me(B!?

e$B$(!\<$H!“e(BRyane$B$K$O$J$s$I$bD\>@$”$C$?$3$H$,$"$j$^$9$,!"F|K\8le(BOK  
e$B$H$$$&OC$OJ9$-$^$;$s!#5!3#K]Lu$8$c$J$$$+$J$"e(B(e$B$H$$$&$3$H$O!"e(B  
e$BFq$7$$OC$O$o$+$i$J$$e(B)e$B!#e(B

|\>completion.rb:141: [BUG] Bus Error  
|\>ruby 1.8.5 (2006-06-27) [i686-darwin8.7.1]  
|  
|e$B$H$$$&$3$H$Ge(B, ruby1.8e$B7O$G$be(Bruby1.9e$B7O$G$be(B [i686-darwin8.7.1] e$B$G$Oe(BBus  
|Error e$B$,H/@8$9$k$N$Ge(B, completion.rbe$B$K%Q%C%A$rEv$F$?$C$F$3$H$G$9$+e(B.  
|  
|e$B$G$be(B, e$B$3$NLdBj$Oe(B, bus error e$B$H$$$&$3$H$Ge(B, completion.rbe$B$GBP=h$9$Y$-Lde(B  
|e$BBj$H$$$&$h$j$Oe(B, Rubye$BK\BN$GBP=h$9$Y$-LdBj$J$N$G$=$A$i$GBP1~$9$Y$-$b$N$@e(B  
|e$B$H;W$$$^$9e(B.  
|  
|e$B$H$$$&$3$H$Ge(B, e$B$^$D$b$H$5$s$h$m$7$/$\*4j$$$7$^$9$Me(B.

e$BOC$rFs$D$KJ,$1$^$7$g$&!#e(B

- e$B%/%i%9$Ke(Bnamee$B$H$$$&L\>A0$N%/%i%9%a%=%C%I$,Dj5A$5$l$F$$$?\>le(B  
e$B9g$K!"e(Birbe$BA4BN$,%(%i!\<=\*N;$7$F$7$^$&!#e(B

- darwine$B$Ge(Bbus error

e$B$H$$$&$o$1$G!"$H$j$"$($:e(Birb/completion.rbe$B$G$Oe(Bnamee$B$re(Bto\_se$B$KCVe(B  
e$B$-49$($k$N$,5H$G$O$J$$$+$H!#e(Bdarwine$B$G$Ne(Bbus  
errore$B$ODI2C\>pJs$re(B  
e$BF@$?;~E@$GD\>$7$?$$$G$9!#e(B

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 11:04am UTC](https://www.ruby-forum.com/t/irb-completion/98695/10 "2006-07-19T11:04:29Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29072] the message: “[ruby-dev:29072] Re: irb completion”,  
on Jul/19 16:32(JST)  
Yukihiro M. writes:

> e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

> |Ryane$B$5$s$OF|K\8le(BOKe$B$J$s$G$9$Me(B!?  
> e$B$(!\<$H!“e(BRyane$B$K$O$J$s$I$bD\>@$”$C$?$3$H$,$"$j$^$9$,!"F|K\8le(BOK  
> e$B$H$$$&OC$OJ9$-$^$;$s!#5!3#K]Lu$8$c$J$$$+$J$"e(B(e$B$H$$$&$3$H$O!"e(B  
> e$BFq$7$$OC$O$o$+$i$J$$e(B)e$B!#e(B

e$B$=$&$+$!e(B. e$B\>iCLIU$-$@$C$?$N$K$#e(B(^^;;

> |e$B$G$be(B, e$B$3$NLdBj$Oe(B, bus error e$B$H$$$&$3$H$Ge(B, completion.rbe$B$GBP=h$9$Y$-Lde(B  
> |e$BBj$H$$$&$h$j$Oe(B, Rubye$BK\BN$GBP=h$9$Y$-LdBj$J$N$G$=$A$i$GBP1~$9$Y$-$b$N$@e(B  
> |e$B$H;W$$$^$9e(B.  
> |  
> |e$B$H$$$&$3$H$Ge(B, e$B$^$D$b$H$5$s$h$m$7$/$\*4j$$$7$^$9$Me(B.
> 
> e$BOC$rFs$D$KJ,$1$^$7$g$&!#e(B

e$B$"!\<e(B. [ruby-dev:  
29070]e$B$r$h$/FI$`$HLdBj$,e(B2e$B$D$"$k$s$G$9$Me(B.

> - e$B%/%i%9$Ke(Bnamee$B$H$$$&L\>A0$N%/%i%9%a%=%C%I$,Dj5A$5$l$F$$$?\>le(B  
> e$B9g$K!“e(Birbe$BA4BN$,%(%i!\<=\*N;$7$F$7$^$&!#e(B  
> e$B”\*e(B e$B$3$l$O$"$-$i$+$K$^$:$$!#e(B

e$B$?$7$+$Ke(B,  
darwine$B$G$J$$$H$-$Oe(Berrore$B$G=\*N;$7$F$7$^$$$^$9$Me(B.

> ```
> namee$B$8$c$J$/$Fe(Bto_se$B$r;H$C$?$[e(B
> e$B$&$,$$$$$s$8$c$J$$$+$J$"!#@PDM$5$sC4Ev!#e(B
> 
> ```

e$B$&!\<$se(B.  
to\_se$B$,:FDj5A$5$l$F$$$k2DG=@-$N$[$&$,$h$j\>/$J$$$3$H$OG’$a$^$9$,e(B…

e$B$H$3$m$Ge(B,

class Foo  
class Bar  
class Baz  
end  
end  
end

e$B$H$J$C$F$$$k$H$-e(B,  
Baze$B$+$ie(Bneste$B\>ee(B1e$B$D\>e$N%/%i%9e(B/e$B%b%8%e!\<%ke(B(e$B$3$N\>l9ge(B  
Foo::Bar)e$B$r\<hF@$9$kJ}K!$C$F$J$$$G$9$+$M$'e(B?

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 11:04am UTC](https://www.ruby-forum.com/t/irb-completion/98695/11 "2006-07-19T11:04:27Z")

</div>

Hi,

At Wed, 19 Jul 2006 03:27:08 +0900,  
Ryan D. wrote in [ruby-dev:29070]:

> irb(main):004:0\> a.to\_a./Users/ryan/Work/cvs/ruby-lang/ruby18/lib/irb/  
> completion.rb:141: [BUG] Bus Error  
> ruby 1.8.5 (2006-06-27) [i686-darwin8.7.1]
> 
> Abort trap

This is a bug of ruby, not of irb. Could you show the  
backtrace?

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 11:50am UTC](https://www.ruby-forum.com/t/irb-completion/98695/12 "2006-07-19T11:50:52Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29074] Re: irb completion”  
on Wed, 19 Jul 2006 18:03:07 +0900, removed\_email\_address@domain.invalid  
(e$B@PDM7=\<ye(B) writes:

|e$B$H$3$m$Ge(B,  
|  
|class Foo  
| class Bar  
| class Baz  
| end  
| end  
|end  
|  
|e$B$H$J$C$F$$$k$H$-e(B, Baze$B$+$ie(Bneste$B\>ee(B1e$B$D\>e$N%/%i%9e(B/e$B%b%8%e!\<%ke(B(e$B$3$N\>l9ge(B  
|Foo::Bar)e$B$r\<hF@$9$kJ}K!$C$F$J$$$G$9$+$M$'e(B?

e$B:#$N$H$3$m$J$$$h$&$J!#L\>A0$H%/%i%9%\*%V%8%’%/%H$,$"$^$j6/$/7ke(B  
e$B$S$D$$$F$$$J$$$N$,860x$G$9$,!"\<hF@$9$kJ}K!$rDs6!$9$k$H$7$?$i!"e(B  
e$B$I$s$Je(BAPIe$B$,$$$$$G$7$g$&$+$M!#e(B

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 12:26pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/13 "2006-07-19T12:26:29Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29074] the message: “[ruby-dev:29074] Re: irb completion”,  
on Jul/19 18:03(JST)  
e$B@PDM7=\<ye(B writes:

> > - e$B%/%i%9$Ke(Bnamee$B$H$$$&L\>A0$N%/%i%9%a%=%C%I$,Dj5A$5$l$F$$$?\>le(B  
> > e$B9g$K!"e(Birbe$BA4BN$,%(%i!\<=\*N;$7$F$7$^$&!#e(B

> > ```
> > namee$B$8$c$J$/$Fe(Bto_se$B$r;H$C$?$[e(B
> > e$B$&$,$$$$$s$8$c$J$$$+$J$"!#@PDM$5$sC4Ev!#e(B
> > 
> > ```
> 
> e$B$&!\<$se(B. to\_se$B$,:FDj5A$5$l$F$$$k2DG=@-$N$[$&$,$h$j\>/$J$$$3$H$OG’$a$^$9e(B  
> e$B$,e(B…

e$B$d$j$?$$$3$H$Oe(B, e$B$"$k%/%i%9L\>$N%a%=%C%I$r\>J$-$?$$$@$1$Ge(B,  
e$B$=$l$i$N%/%i%9e(B  
e$B$Oe(Bnamee$B$,:FDj5A$5$l$F$$$k$3$H$O$J$$e(B.  
to\_se$B$b:FDj5A$5$l$k2DG=@-$O$J$/$O$Je(B  
e$B$$e(B. e$B$H$$$&$3$H$Ge(B,  
ryane$B$5$s$N$b$N$re(Bruby1.9e$B7O$G$bF0$/$h$&$K$7$?$b$N$K$7e(B  
e$B$h$&$H;W$$$^$9e(B.

e$B$D$^$je(B:

```
  # func1.func2
  candidates = []
  ObjectSpace.each_object(Module){|m|
    begin
      name = m.name
    rescue Exception
      name = ""
    end
    next if name != "IRB::Context" and
      /^(IRB|SLex|RubyLex|RubyToken)/ =~ name
    candidates.concat m.instance_methods(false)
  }
  candidates.sort!
  candidates.uniq!

```

e$B$$$+$,$G$7$g$&e(B?

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/14 "2006-07-19T16:05:22Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:29077] Re: irb completion”  
on Wed, 19 Jul 2006 19:24:04 +0900, removed\_email\_address@domain.invalid  
(e$B@PDM7=\<ye(B) writes:

|e$B$D$^$je(B:  
|  
| # func1.func2  
| candidates = []  
| ObjectSpace.each\_object(Module){|m|  
| begin  
| name = m.name  
| rescue Exception  
| name = “”  
| end  
| next if name != “IRB::Context” and  
| /^(IRB|SLex|RubyLex|RubyToken)/ =~ name  
| candidates.concat m.instance\_methods(false)  
| }  
| candidates.sort!  
| candidates.uniq!  
|  
|e$B$$$+$,$G$7$g$&e(B?

e$B$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 5:11pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/15 "2006-07-19T17:11:11Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29081] the message: “[ruby-dev:29081] Re: irb  
completion”, on Jul/19 23:02(JST) Yukihiro M. writes:

> e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

> e$B$$$$$s$8$c$J$$$G$7$g$&$+!#e(B

cie$B$7$^$7$?e(B.

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 19, 2006, 12:03pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/16 "2006-07-19T12:03:42Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:29075] the message: “[ruby-dev:29075] Re: irb  
completion”, on Jul/19 18:48(JST) Yukihiro M. writes:

> e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

> |Foo::Bar)e$B$r\<hF@$9$kJ}K!$C$F$J$$$G$9$+$M$'e(B?
> 
> e$B:#$N$H$3$m$J$$$h$&$J!#e(B

e$B$d$O$je(B, e$B:#$N=j\<hF@$9$kJ}K!$O$J$$$G$9$+e(B… e$B$=$l$3$=e(B,  
Module#namee$B$r;H$(e(B  
e$B$P4V@\E\*$KF@$k$3$H$O$G$-$^$9$,e(B…

> e$BL\>A0$H%/%i%9%\*%V%8%’%/%H$,$"$^$j6/$/7ke(B  
> e$B$S$D$$$F$$$J$$$N$,860x$G$9$,!"\<hF@$9$kJ}K!$rDs6!$9$k$H$7$?$i!"e(B  
> e$B$I$s$Je(BAPIe$B$,$$$$$G$7$g$&$+$M!#e(B

e$BD\>\>e$@$1$G$"$kI,MW$O$J$$$N$Ge(B, neste$B$N%Q%9$r$9$Y$FJV$9$H$7$Fe(B

Module#nesting

e$B$G$be(B, Module::nesting e$B$H4V0c$($d$9$$$+$J$!e(B…

\_\_  
----------------------------------------------------\>\> e$B@PDMe(B  
e$B7=\<ye(B \<\<—  
----------------------------------\>\> e-mail: removed\_email\_address@domain.invalid \<\<—

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 23, 2006, 11:24am UTC](https://www.ruby-forum.com/t/irb-completion/98695/17 "2006-07-23T11:24:58Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
Ryan D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> ruby 1.8.5 (2006-06-27) [i686-darwin8.7.1]
> 
> Abort trap

reduced script:

% ./ruby -rreadline -e ‘Readline.completion\_proc = lambda { raise }; p  
Readline.readline(“\>\>”)’

> > -e:1: [BUG] Bus Error  
> > ruby 1.8.5 (2006-07-21) [powerpc-darwin8.6.0]

zsh: abort ./ruby -rreadline -e  
% gdb ruby  
GNU gdb 6.1-20040303 (Apple version gdb-413) (Wed May 18 10:17:02 GMT  
2005)  
Copyright 2004 Free Software Foundation, Inc.  
GDB is free software, covered by the GNU General Public License, and you  
are  
welcome to change it and/or distribute copies of it under certain  
conditions.  
Type “show copying” to see the conditions.  
There is absolutely no warranty for GDB. Type “show warranty” for  
details.  
This GDB was configured as “powerpc-apple-darwin”…Reading symbols for  
shared libraries … done

(gdb) run -rreadline -e ‘Readline.completion\_proc = lambda { raise }; p  
Readline.readline(“\>\>”)’  
Starting program: /Users/akr/ruby/18/ruby/ruby -rreadline -e  
‘Readline.completion\_proc = lambda { raise }; p Readline.readline(“\>\>”)’  
Reading symbols for shared libraries … done  
Reading symbols for shared libraries … done

> >

Program received signal EXC\_BAD\_ACCESS, Could not access memory.  
Reason: KERN\_PROTECTION\_FAILURE at address: 0x00000000  
0x00000000 in ?? ()  
(gdb) bt  
#0 0x00000000 in ?? ()  
Cannot access memory at address 0x0  
Cannot access memory at address 0x0  
Cannot access memory at address 0x0  
#1 0x001e6280 in readline\_readline (argc=Cannot access memory at  
address 0x0  
Cannot access memory at address 0x0  
4345712, argv=0x4, self=570425956) at readline.c:86  
Cannot access memory at address 0x0  
#2 0x0000d944 in rb\_call0 (klass=1918640, recv=1918700, id=7057,  
oid=7057, argc=1, argv=0xbfffe4a0, body=0x1d469c, flags=0) at  
eval.c:5812  
#3 0x0000e34c in rb\_call (klass=1918640, recv=1918700, mid=7057,  
argc=1, argv=0xbfffe4a0, scope=0) at eval.c:6043  
#4 0x0000b478 in rb\_eval (self=1980900, n=0x6) at eval.c:3445  
#5 0x0000b53c in rb\_eval (self=1980900, n=0x6) at eval.c:3455  
#6 0x0001ab28 in ruby\_exec\_internal () at eval.c:1606  
#7 0x0001ab70 in ruby\_exec () at eval.c:1626  
#8 0x0001abb8 in ruby\_run () at eval.c:1636  
#9 0x0000225c in main (argc=4, argv=0xbffff7f8, envp=0x22000264) at  
main.c:46  
(gdb) up  
#1 0x001e6280 in readline\_readline (argc=4345712, argv=0x4,  
self=570425956) at readline.c:86  
86 (\*rl\_deprep\_term\_function)();  
(gdb) p rl\_deprep\_term\_function  
$1 =   
(gdb) p (void \*)rl\_deprep\_term\_function  
$2 = (void \*) 0x0  
(gdb)

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 23, 2006, 6:20pm UTC](https://www.ruby-forum.com/t/irb-completion/98695/18 "2006-07-23T18:20:49Z")

</div>

In article [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid),  
Tanaka A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) writes:

> (gdb) p (void \*)rl\_deprep\_term\_function  
> $2 = (void \*) 0x0

It is libedit problem.

It is possible on other than darwin.

% ./ruby -rreadline -e ‘Readline.completion\_proc = lambda { raise }; p  
Readline.readline(“\>\>”)’

> > -e:1: [BUG] Segmentation fault  
> > ruby 1.9.0 (2006-07-23) [i386-netbsdelf2.0.1]

zsh: abort (core dumped) ./ruby -rreadline -e  
% ldd .ext/i386-netbsdelf2.0.1/readline.so  
.ext/i386-netbsdelf2.0.1/readline.so:  
-ledit.2 =\> /usr/lib/libedit.so.2  
-ltermcap.0 =\> /usr/lib/libtermcap.so.0  
-lcrypt.0 =\> /usr/lib/libcrypt.so.0  
-lm.0 =\> /usr/lib/libm387.so.0  
-lm.0 =\> /usr/lib/libm.so.0  
-lc.12 =\> /usr/lib/libc.so.12

I reported the problem:  
[http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=34062](http://www.NetBSD.org/cgi-bin/query-pr-single.pl?number=34062)

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 24, 2006, 5:16am UTC](https://www.ruby-forum.com/t/irb-completion/98695/19 "2006-07-24T05:16:46Z")

</div>

Hi,

In message “Re: [ruby-dev:29116] Re: irb completion”  
on Mon, 24 Jul 2006 01:18:03 +0900, Tanaka A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
writes:

|\> (gdb) p (void \*)rl\_deprep\_term\_function  
|\> $2 = (void \*) 0x0  
|  
|It is libedit problem.  
|It is possible on other than darwin.  
|  
|% ./ruby -rreadline -e ‘Readline.completion\_proc = lambda { raise }; p Readline.readline(“\>\>”)’  
|\>\>-e:1: [BUG] Segmentation fault  
|ruby 1.9.0 (2006-07-23) [i386-netbsdelf2.0.1]

Do you mean NetBSD uses libedit?

```
						matz.

```

---

<div class="post-metadata">

**Author:** ![Tadayoshi\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/2bfe46/32.png) [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Post date:** [July 23, 2006, 8:56am UTC](https://www.ruby-forum.com/t/irb-completion/98695/20 "2006-07-23T08:56:55Z")

</div>

On Jul 19, 2006, at 2:02 AM, removed\_email\_address@domain.invalid wrote:

> This is a bug of ruby, not of irb. Could you show the  
> backtrace?

% gdb ./miniruby  
GNU gdb 6.3.50-20050815 (Apple version gdb-477) (Sun Apr 30 20:01:44  
GMT 2006)  
Copyright 2004 Free Software Foundation, Inc.  
GDB is free software, covered by the GNU General Public License, and  
you are  
welcome to change it and/or distribute copies of it under certain  
conditions.  
Type “show copying” to see the conditions.  
There is absolutely no warranty for GDB. Type “show warranty” for  
details.  
This GDB was configured as “i386-apple-darwin”…Reading symbols for  
shared libraries … done

(gdb) r ./runruby.rb --extout=.ext – ./bin/irb  
Starting program: /Users/ryan/Work/cvs/ruby-lang/ruby18/miniruby ./  
runruby.rb --extout=.ext – ./bin/irb  
Reading symbols for shared libraries … done

Program received signal SIGTRAP, Trace/breakpoint trap.  
0x8fe01010 in \_\_dyld\_\_dyld\_start ()  
(gdb) c  
Continuing.  
Reading symbols for shared libraries … done  
irb(main):001:0\> require ‘date’; def Date.name(explode);end; a=[]  
=\> []  
irb(main):002:0\> a.to\_a.  
Program received signal EXC\_BAD\_ACCESS, Could not access memory.  
Reason: KERN\_PROTECTION\_FAILURE at address: 0x00000000  
0x00000000 in ?? ()  
(gdb) bt  
#0 0x00000000 in ?? ()  
#1 0x001f6a0e in readline\_readline (argc=2, argv=0xbfff5bb0,  
self=1913860) at readline.c:86  
#2 0x00004123 in call\_cfunc (func=0x1f687a \<readline\_readline\>,  
recv=1913860, len=-1073784648, argc=2, argv=0xbfff5bb0) at eval.c:5620  
#3 0x0000caab in rb\_call0 (klass=3206620, recv=1913860, id=7057,  
oid=7057, argc=2, argv=0xbfff5bb0, body=0x30f444, flags=2) at eval.c:  
5776  
#4 0x0000d540 in rb\_call (klass=3206620, recv=1913860, mid=7057,  
argc=2, argv=0xbfff5bb0, scope=1) at eval.c:6006  
#5 0x0000a4f1 in rb\_eval (self=1913860, n=0x4) at eval.c:3450  
#6 0x0000adc5 in rb\_eval (self=1913860, n=0x4) at eval.c:3616  
#7 0x0000b60d in rb\_eval (self=1913860, n=0x4) at eval.c:2994  
#8 0x0000d1fb in rb\_call0 (klass=3206720, recv=1913860, id=7049,  
oid=7049, argc=0, argv=0x0, body=0x30fe58, flags=0) at eval.c:5912  
#9 0x0000d540 in rb\_call (klass=3206720, recv=1913860, mid=7049,  
argc=0, argv=0x0, scope=0) at eval.c:6006  
#10 0x0000b4e1 in rb\_eval (self=1927380, n=0x4) at eval.c:3435  
#11 0x0000ad88 in rb\_eval (self=1927380, n=0x4) at eval.c:3626  
#12 0x0000b60d in rb\_eval (self=1927380, n=0x4) at eval.c:2994  
#13 0x0001138b in rb\_yield\_0 (val=6, self=1927380, klass=0, flags=0,  
avalue=0) at eval.c:4953  
#14 0x0000b531 in rb\_eval (self=1927380, n=0x4) at eval.c:3239  
#15 0x0000c118 in rb\_eval (self=1927380, n=0x4) at eval.c:3299  
#16 0x0000d1fb in rb\_call0 (klass=3185580, recv=1927380, id=10529,  
oid=10529, argc=1, argv=0xbfff7550, body=0x1dea5c, flags=0) at eval.c:  
5912  
#17 0x0000d540 in rb\_call (klass=3185580, recv=1927380, mid=10529,  
argc=1, argv=0xbfff7550, scope=1) at eval.c:6006  
#18 0x0000a4f1 in rb\_eval (self=1927380, n=0x4) at eval.c:3450  
#19 0x0000c3e9 in rb\_eval (self=1927380, n=0x4) at eval.c:3163  
#20 0x0001138b in rb\_yield\_0 (val=5787740, self=1927380, klass=0,  
flags=0, avalue=2) at eval.c:4953  
#21 0x00011d77 in proc\_invoke (proc=3505740, args=5787740, self=6,  
klass=0) at eval.c:8471  
#22 0x0000caab in rb\_call0 (klass=1993900, recv=3505740, id=5217,  
oid=5217, argc=0, argv=0x0, body=0x1e6bf8, flags=0) at eval.c:5776  
#23 0x0000d540 in rb\_call (klass=1993900, recv=3505740, mid=5217,  
argc=0, argv=0x0, scope=0) at eval.c:6006  
#24 0x0000b4e1 in rb\_eval (self=1913700, n=0x4) at eval.c:3435  
#25 0x0000adc5 in rb\_eval (self=1913700, n=0x4) at eval.c:3616  
#26 0x0000d1fb in rb\_call0 (klass=3314700, recv=1913700, id=13257,  
oid=13257, argc=0, argv=0x0, body=0x34fa6c, flags=2) at eval.c:5912  
#27 0x0000d540 in rb\_call (klass=3314700, recv=1913700, mid=13257,  
argc=0, argv=0x0, scope=2) at eval.c:6006  
#28 0x0000b259 in rb\_eval (self=1913700, n=0x4) at eval.c:3456  
#29 0x0000b60d in rb\_eval (self=1913700, n=0x4) at eval.c:2994  
#30 0x0000957f in rb\_eval (self=1913700, n=0x4) at eval.c:3087  
#31 0x0000d1fb in rb\_call0 (klass=3314700, recv=1913700, id=6993,  
oid=6993, argc=0, argv=0x0, body=0x351a74, flags=0) at eval.c:5912  
#32 0x0000d540 in rb\_call (klass=3314700, recv=1913700, mid=6993,  
argc=0, argv=0x0, scope=0) at eval.c:6006  
#33 0x0000b4e1 in rb\_eval (self=1896440, n=0x4) at eval.c:3435  
#34 0x0000adc5 in rb\_eval (self=1896440, n=0x4) at eval.c:3616  
#35 0x00009cdf in rb\_eval (self=1896440, n=0x4) at eval.c:2905  
#36 0x0000d1fb in rb\_call0 (klass=3315280, recv=1896440, id=14249,  
oid=14249, argc=1, argv=0xbfff98b0, body=0x3319f4, flags=0) at eval.c:  
5912  
#37 0x0000d540 in rb\_call (klass=3315280, recv=1896440, mid=14249,  
argc=1, argv=0xbfff98b0, scope=0) at eval.c:6006  
#38 0x0000b4e1 in rb\_eval (self=1896760, n=0x4) at eval.c:3435  
#39 0x0000addb in rb\_eval (self=1896760, n=0x4) at eval.c:3379  
#40 0x0000d1fb in rb\_call0 (klass=3320120, recv=1896760, id=4273,  
oid=4273, argc=1, argv=0xbfff9fc0, body=0x335b80, flags=0) at eval.c:  
5912  
#41 0x0000d540 in rb\_call (klass=3320120, recv=1896760, mid=4273,  
argc=1, argv=0xbfff9fc0, scope=0) at eval.c:6006  
#42 0x0000b4e1 in rb\_eval (self=1913700, n=0x4) at eval.c:3435  
#43 0x0000adc5 in rb\_eval (self=1913700, n=0x4) at eval.c:3616  
#44 0x0000bc58 in rb\_eval (self=1913700, n=0x4) at eval.c:3250  
#45 0x0000957f in rb\_eval (self=1913700, n=0x4) at eval.c:3087  
#46 0x0000d1fb in rb\_call0 (klass=3314700, recv=1913700, id=13385,  
oid=13385, argc=0, argv=0x0, body=0x34d9b0, flags=0) at eval.c:5912  
#47 0x0000d540 in rb\_call (klass=3314700, recv=1913700, mid=13385,  
argc=0, argv=0x0, scope=2) at eval.c:6006  
#48 0x0000b259 in rb\_eval (self=1913700, n=0x4) at eval.c:3456  
#49 0x0000adc5 in rb\_eval (self=1913700, n=0x4) at eval.c:3616  
#50 0x0000b3fe in rb\_eval (self=1913700, n=0x4) at eval.c:3429  
#51 0x000092ef in rb\_eval (self=1913700, n=0x4) at eval.c:3602  
#52 0x00009238 in rb\_eval (self=1913700, n=0x4) at eval.c:3596  
#53 0x000092ef in rb\_eval (self=1913700, n=0x4) at eval.c:3602  
#54 0x0000966e in rb\_eval (self=1913700, n=0x4) at eval.c:3118  
#55 0x0000d1fb in rb\_call0 (klass=3314700, recv=1913700, id=13369,  
oid=13369, argc=0, argv=0x0, body=0x34dd70, flags=0) at eval.c:5912  
#56 0x0000d540 in rb\_call (klass=3314700, recv=1913700, mid=13369,  
argc=0, argv=0x0, scope=2) at eval.c:6006  
#57 0x0000b259 in rb\_eval (self=1913700, n=0x4) at eval.c:3456  
#58 0x0000ad88 in rb\_eval (self=1913700, n=0x4) at eval.c:3626  
#59 0x0000b60d in rb\_eval (self=1913700, n=0x4) at eval.c:2994  
#60 0x0000bc58 in rb\_eval (self=1913700, n=0x4) at eval.c:3250  
#61 0x0001138b in rb\_yield\_0 (val=6, self=1913700, klass=0, flags=0,  
avalue=0) at eval.c:4953  
#62 0x0001246a in rb\_f\_loop () at eval.c:5097  
#63 0x0000caab in rb\_call0 (klass=2055320, recv=1913700, id=3929,  
oid=3929, argc=0, argv=0x0, body=0x1f412c, flags=2) at eval.c:5776  
#64 0x0000d540 in rb\_call (klass=2055320, recv=1913700, mid=3929,  
argc=0, argv=0x0, scope=1) at eval.c:6006  
#65 0x0000a4f1 in rb\_eval (self=1913700, n=0x4) at eval.c:3450  
#66 0x0000c3e9 in rb\_eval (self=1913700, n=0x4) at eval.c:3163  
#67 0x0001138b in rb\_yield\_0 (val=3421454, self=1913700, klass=0,  
flags=0, avalue=0) at eval.c:4953  
#68 0x00012413 in rb\_f\_catch (dmy=1913700, tag=3421454) at eval.c:12927  
#69 0x0000caab in rb\_call0 (klass=2055320, recv=1913700, id=3993,  
oid=3993, argc=1, argv=0xbfffd5f0, body=0x1f3ed4, flags=2) at eval.c:  
5776  
#70 0x0000d540 in rb\_call (klass=2055320, recv=1913700, mid=3993,  
argc=1, argv=0xbfffd5f0, scope=1) at eval.c:6006  
#71 0x0000a4f1 in rb\_eval (self=1913700, n=0x4) at eval.c:3450  
#72 0x0000c3e9 in rb\_eval (self=1913700, n=0x4) at eval.c:3163  
#73 0x0000d1fb in rb\_call0 (klass=3314700, recv=1913700, id=10585,  
oid=10585, argc=0, argv=0x0, body=0x34e0e0, flags=0) at eval.c:5912  
#74 0x0000d540 in rb\_call (klass=3314700, recv=1913700, mid=10585,  
argc=0, argv=0x0, scope=0) at eval.c:6006  
#75 0x0000b4e1 in rb\_eval (self=1927380, n=0x4) at eval.c:3435  
#76 0x0000c3e9 in rb\_eval (self=1927380, n=0x4) at eval.c:3163  
#77 0x0000d1fb in rb\_call0 (klass=3185580, recv=1927380, id=10265,  
oid=10265, argc=0, argv=0x0, body=0x1e1a90, flags=0) at eval.c:5912  
#78 0x0000d540 in rb\_call (klass=3185580, recv=1927380, mid=10265,  
argc=0, argv=0x0, scope=0) at eval.c:6006  
#79 0x0000b4e1 in rb\_eval (self=1906100, n=0x4) at eval.c:3435  
#80 0x0001138b in rb\_yield\_0 (val=2626830, self=1906100, klass=0,  
flags=0, avalue=0) at eval.c:4953  
#81 0x00012413 in rb\_f\_catch (dmy=1906100, tag=2626830) at eval.c:12927  
#82 0x0000caab in rb\_call0 (klass=2055320, recv=1906100, id=3993,  
oid=3993, argc=1, argv=0xbfffe9f0, body=0x1f3ed4, flags=2) at eval.c:  
5776  
#83 0x0000d540 in rb\_call (klass=2055320, recv=1906100, mid=3993,  
argc=1, argv=0xbfffe9f0, scope=1) at eval.c:6006  
#84 0x0000a4f1 in rb\_eval (self=1906100, n=0x4) at eval.c:3450  
#85 0x0000c3e9 in rb\_eval (self=1906100, n=0x4) at eval.c:3163  
#86 0x0000d1fb in rb\_call0 (klass=1906020, recv=1906100, id=5033,  
oid=5033, argc=1, argv=0xbffff140, body=0x1e4128, flags=0) at eval.c:  
5912  
#87 0x0000d540 in rb\_call (klass=1906020, recv=1906100, mid=5033,  
argc=1, argv=0xbffff140, scope=0) at eval.c:6006  
#88 0x0000b4e1 in rb\_eval (self=2050540, n=0x4) at eval.c:3435  
#89 0x00019c83 in ruby\_exec\_internal () at eval.c:1595  
#90 0x00019cb4 in ruby\_exec () at eval.c:1615  
#91 0x00019cdf in ruby\_run () at eval.c:1625  
#92 0x000027e4 in main (argc=2, argv=0xbffff548, envp=0xbffff554) at  
main.c:46  
(gdb) f 1  
#1 0x001f6a0e in readline\_readline (argc=2, argv=0xbfff5bb0,  
self=1913860) at readline.c:86  
86 (_rl\_deprep\_term\_function)();  
(gdb) l  
81 #if defined HAVE\_RL\_CLEANUP\_AFTER\_SIGNAL  
82 /_ restore terminal mode and signal handler\*/  
83 rl\_cleanup\_after\_signal();  
84 #elif defined HAVE\_RL\_DEPREP\_TERM\_FUNCTION  
85 /\* restore terminal mode \*/  
86 (\*rl\_deprep\_term\_function)();  
87 #else  
88 rl\_deprep\_terminal();  
89 #endif  
90 rb\_jump\_tag(status);

[Next page](https://www.ruby-forum.com/t/irb-completion/98695.md?page=2)
