[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

Re: x86_64 -- warning and errors

From: ts <decoux@...>
Date: 2004-11-02 17:15:56 UTC
List: ruby-core #3685
>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:

Y> --- string.c	31 Oct 2004 17:37:52 -0000	1.213
Y> +++ string.c	2 Nov 2004 15:52:40 -0000
Y> @@ -4455,3 +4455,3 @@ rb_str_sum(argc, argv, str)
Y>      else {
Y> -	unsigned int sum = 0;
Y> +	unsigned long sum = 0;
 
 apparently it need also this

 
uln% diff -u string.c.orig string.c
--- string.c.orig       2004-11-02 17:36:38.000000000 +0100
+++ string.c    2004-11-02 18:10:46.000000000 +0100
@@ -4453,7 +4453,7 @@
        return sum;
     }
     else {
-       unsigned int sum = 0;
+       unsigned long sum = 0;
 
        while (p < pend) {
            str_mod_check(str, ptr, len);
@@ -4461,7 +4461,7 @@
            p++;
        }
        if (bits != 0) {
-           sum &= (1<<bits)-1;
+           sum &= (((unsigned long)1)<<bits)-1;
        }
        return rb_int2inum(sum);
     }
uln% 

uln% ./ruby -v test/ruby/test_string.rb 
ruby 1.9.0 (2004-11-02) [x86_64-linux]
Loaded suite test/ruby/test_string
Started
.
Finished in 0.001544 seconds.

1 tests, 75 assertions, 0 failures, 0 errors
uln% 


Guy Decoux



In This Thread

Prev Next