"".lines.dup.to_a causes NameError

[email protected]$G$9!#e(B

Enumerator e$B$re(B dup e$B$7$F;H$&$H0J2<$N$h$&$K%(%i!<$,=P$^$9!#e(B

~/c/bitclust % ruby-yarv -ve ‘"".lines.dup.to_a’
ruby 1.9.0 (2007-01-23 patchlevel 0) [x86_64-linux]
-e:1:in to_a': undefined local variable or methodcall’ for
false:FalseClass (NameError)
from -e:1:in `’

initialize_copy e$B$,Dj5A$5$l$F$J$$$?$a$Ke(B Proc e$B$rJ]B8$7$H$/e(B
e$B%a%s%P$,e(B NULL e$B$K$J$C$F$k$s$8$c!<$J$$$+$H?dB,$7$^$9!#e(B

~ % grep initialize ~/src/ruby/enumerator.c
rb_raise(rb_eArgError, “uninitialized enumerator”);
enumerator_initialize(int argc, VALUE *argv, VALUE obj)
rb_define_method(rb_cEnumerator, “initialize”,
enumerator_initialize, -1);
~ %

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

In message “Re: [ruby-dev:30192] “”.lines.dup.to_a causes NameError”
on Fri, 26 Jan 2007 07:17:25 +0900, Minero A.
[email protected] writes:

|Enumerator e$B$re(B dup e$B$7$F;H$&$H0J2<$N$h$&$K%(%i!<$,=P$^$9!#e(B
|
| ~/c/bitclust % ruby-yarv -ve ‘"".lines.dup.to_a’
| ruby 1.9.0 (2007-01-23 patchlevel 0) [x86_64-linux]
| -e:1:in to_a': undefined local variable or methodcall’ for false:FalseClass (NameError)
| from -e:1:in `’
|
|initialize_copy e$B$,Dj5A$5$l$F$J$$$?$a$Ke(B Proc e$B$rJ]B8$7$H$/e(B
|e$B%a%s%P$,e(B NULL e$B$K$J$C$F$k$s$8$c!<$J$$$+$H?dB,$7$^$9!#e(B

e$B$=$NDL$j$G$9$M!#e(Btrunke$B$GD>$7$^$7$?!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs