[#31320] Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...>

-----BEGIN PGP SIGNED MESSAGE-----

124 messages 2007/08/01
[#31321] Re: Import RubyGems to Ruby 1.9 — Nobuyoshi Nakada <nobu@...> 2007/08/01

なかだです。

[#31329] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/08/01

-----BEGIN PGP SIGNED MESSAGE-----

[#31918] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/30

-----BEGIN PGP SIGNED MESSAGE-----

[#31970] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/08

-----BEGIN PGP SIGNED MESSAGE-----

[#32023] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/11

まつもと ゆきひろです

[#32062] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32066] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32068] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32069] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32070] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/15

-----BEGIN PGP SIGNED MESSAGE-----

[#32073] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/15

まつもと ゆきひろです

[#32079] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/16

-----BEGIN PGP SIGNED MESSAGE-----

[#32080] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/10/16

まつもと ゆきひろです

[#32132] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/23

-----BEGIN PGP SIGNED MESSAGE-----

[#32081] Re: Import RubyGems to Ruby 1.9 — Takahiro Kambe <taca@...> 2007/10/16

In message <471447D5.5050902@sarion.co.jp>

[#32087] Re: Import RubyGems to Ruby 1.9 — "Akinori MUSHA" <knu@...> 2007/10/17

 Rubygems は、基本的に他のパッケージシステムから包みやすい作り

[#32104] Re: Import RubyGems to Ruby 1.9 — akira yamada <akira@...> 2007/10/20

Tuesday 16 October 2007 14:09:13 に NAKAMURA, Hiroshi さんは書きました:

[#32109] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/10/20

-----BEGIN PGP SIGNED MESSAGE-----

[#31332] Re: Import RubyGems to Ruby 1.9 — Tadayoshi Funaba <tadf@...> 2007/08/01

> ちなみに「ruby/1.9.1の標準添付からどのライブラリを外すか?」という議論も

[#31858] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/25

-----BEGIN PGP SIGNED MESSAGE-----

[#31872] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/27

-----BEGIN PGP SIGNED MESSAGE-----

[#31905] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/29

-----BEGIN PGP SIGNED MESSAGE-----

[#31906] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/09/29

まつもと ゆきひろです

[#31910] Re: Import RubyGems to Ruby 1.9 — "NAKAMURA, Hiroshi" <nakahiro@...> 2007/09/30

-----BEGIN PGP SIGNED MESSAGE-----

[#31920] Re: Import RubyGems to Ruby 1.9 — Yukihiro Matsumoto <matz@...> 2007/09/30

まつもと ゆきひろです

[#31323] Bignum#to_s の Karatsuba 基数変換による高速化 — "Kenta Murata" <muraken@...>

むらけんです.

16 messages 2007/08/01
[#31326] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — Yukihiro Matsumoto <matz@...> 2007/08/01

まつもと ゆきひろです

[#31327] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — "Kenta Murata" <muraken@...> 2007/08/01

むらけんです.

[#31328] Re: Bignum#to_s の Karatsuba 基数変換による高速化 — Yukihiro Matsumoto <matz@...> 2007/08/01

まつもと ゆきひろです

[#31525] いくつかのバグ報告と提案(5点) — eklerni <eklerni@...>

From:eklerni

13 messages 2007/08/20

[#31539] strtod の精度 — Satoshi Nakagawa <snakagawa@...>

中川といいます。

27 messages 2007/08/20
[#31542] Re: strtod の精度 — Yukihiro Matsumoto <matz@...> 2007/08/20

まつもと ゆきひろです

[ruby-dev:31599] Re: [ ruby-Bugs-9490 ] Date module, step method, infinite loop if +step+ is 0 should raise an exception?

From: Tadayoshi Funaba <tadf@...>
Date: 2007-08-22 13:16:26 UTC
List: ruby-dev #31599
step メソッドについて、step が零の場合、直ちにエラーにするということで
合せませんか (添付のように)。Range でもそうなのですが、現状では、なん
ら検査もなく、Enumerator が生成されるので、引数エラーのすべてが遅延さ
れてしまいます。

あるいは、この際、step の零を認めるということでもいいかもしれません。

Inf = 1.0/0
e = 0.step(0,0).zip(0.step(Inf))
e.each{|a| p a}

といったことが出来でも悪くはないと思います。


Index: lib/date.rb
===================================================================
--- lib/date.rb	(revision 13230)
+++ lib/date.rb	(working copy)
@@ -1400,11 +1400,14 @@
   # we reach +limit+ (inclusive), yielding the resultant
   # date at each step.
   def step(limit, step=1) # :yield: date
+    if step.zero?
+      raise ArgumentError, "step can't be 0"
+    end
     unless block_given?
       return to_enum(:step, limit, step)
     end
     da = self
-    op = %w(- <= >=)[step <=> 0]
+    op = %w(? <= >=)[step <=> 0]
     while da.__send__(op, limit)
       yield da
       da += step
Index: range.c
===================================================================
--- range.c	(revision 13230)
+++ range.c	(working copy)
@@ -287,8 +287,6 @@
     VALUE b, e, step;
     long unit;
 
-    RETURN_ENUMERATOR(range, argc, argv);
-
     b = rb_ivar_get(range, id_beg);
     e = rb_ivar_get(range, id_end);
     if (rb_scan_args(argc, argv, "01", &step) == 0) {
@@ -301,6 +299,9 @@
     } 
     if (unit == 0)
 	rb_raise(rb_eArgError, "step can't be 0");
+
+    RETURN_ENUMERATOR(range, argc, argv);
+
     if (FIXNUM_P(b) && FIXNUM_P(e)) { /* fixnums are special */
 	long end = FIX2LONG(e);
 	long i;
@@ -380,8 +381,6 @@
 {
     VALUE beg, end;
 
-    RETURN_ENUMERATOR(range, 0, 0);
-
     beg = rb_ivar_get(range, id_beg);
     end = rb_ivar_get(range, id_end);
 
@@ -389,6 +388,9 @@
 	rb_raise(rb_eTypeError, "can't iterate from %s",
 		 rb_obj_classname(beg));
     }
+
+    RETURN_ENUMERATOR(range, 0, 0);
+
     if (FIXNUM_P(beg) && FIXNUM_P(end)) { /* fixnums are special */
 	long lim = FIX2LONG(end);
 	long i;
Index: numeric.c
===================================================================
--- numeric.c	(revision 13230)
+++ numeric.c	(working copy)
@@ -1394,7 +1394,6 @@
 {
     VALUE to, step;
 
-    RETURN_ENUMERATOR(from, argc, argv);
     if (argc == 1) {
 	to = argv[0];
 	step = INT2FIX(1);
@@ -1411,6 +1410,7 @@
 	    rb_raise(rb_eArgError, "step can't be 0");
 	}
     }
+    RETURN_ENUMERATOR(from, argc, argv);
 
     if (FIXNUM_P(from) && FIXNUM_P(to) && FIXNUM_P(step)) {
 	long i, end, diff;

In This Thread