[Bug:1.9] ("00".."00").to_a => ["0"]

e$B$$$^$$$G$9!#e(B

r24562 e$B0J9_!"e(B(“00”…“00”).to_a e$B$,e(B [“0”]
e$B$K$J$j$^$9!#$=$l0JA0$Oe(B [“00”]
e$B$G$7$?!#e(BString#upto e$B$NJQ99$K$h$k1F6A$N$h$&$G$9!#e(B

$ ./miniruby -ve ‘p((“00”…“00”).to_a)’
ruby 1.9.2dev (2009-08-17 trunk 24561) [i686-linux]
[“00”]
$ ./miniruby -ve ‘p((“00”…“00”).to_a)’
ruby 1.9.2dev (2009-08-17 trunk 24562) [i686-linux]
[“0”]

e$B;~9o$K4p$E$/%G!<%?$r%$%F%l!<%H$9$k$H$-$Ke(B (“00”…“23”).each{|hour|
…}
e$B$J$I$H$9$k$3$H$,B?$$$N$G$9$,!"7e$,B7$o$J$/$J$C$F$7$^$C$F$A$g$C$HITJX$Ge(B
e$B$9!#0J2<$N$h$&$J%F%9%H$bDL$k$h$&$K$O$J$i$J$$$G$7$g$&$+!)e(B

Nobuhiro IMAI [email protected]
Key fingerprint = F39E D552 545D 7C64 D690 F644 5A15 746C BD8E 7106

Index: test/ruby/test_range.rb

— test/ruby/test_range.rb (revision 25039)
+++ test/ruby/test_range.rb (working copy)
@@ -14,6 +14,7 @@
assert_equal([“6”, “7”, “8”], (“6”…“8”).to_a,
“[ruby-talk:343187]”)
assert_equal([“6”, “7”], (“6”…“8”).to_a)
assert_equal([“9”, “10”], (“9”…“10”).to_a)

  • assert_equal([“09”, “10”], (“09”…“10”).to_a)
    assert_equal([“9”, “10”], (SimpleDelegator.new(“9”)…“10”).to_a)
    assert_equal([“9”, “10”], (“9”…SimpleDelegator.new(“10”)).to_a)
    end

e$B%A%1%C%He(B #2132 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

Applied in changeset r25050.

http://redmine.ruby-lang.org/issues/show/2132

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