ruby-changes:12132
From: yugui <ko1@a...>
Date: Sun, 21 Jun 2009 19:36:20 +0900 (JST)
Subject: [ruby-changes:12132] Ruby:r23804 (ruby_1_9_1): merges r23744 from trunk into ruby_1_9_1.
yugui 2009-06-21 19:36:04 +0900 (Sun, 21 Jun 2009) New Revision: 23804 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23804 Log: merges r23744 from trunk into ruby_1_9_1. -- * complex.c: constant COMPLEX_NAME has been removed. * rational.c: constant RATIONAL_NAME has been removed. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/complex.c branches/ruby_1_9_1/rational.c branches/ruby_1_9_1/version.h Index: ruby_1_9_1/complex.c =================================================================== --- ruby_1_9_1/complex.c (revision 23803) +++ ruby_1_9_1/complex.c (revision 23804) @@ -11,10 +11,6 @@ #define NDEBUG #include <assert.h> -#ifndef COMPLEX_NAME -#define COMPLEX_NAME "Complex" -#endif - #define ZERO INT2FIX(0) #define ONE INT2FIX(1) #define TWO INT2FIX(2) @@ -1399,7 +1395,7 @@ id_to_r = rb_intern("to_r"); id_to_s = rb_intern("to_s"); - rb_cComplex = rb_define_class(COMPLEX_NAME, rb_cNumeric); + rb_cComplex = rb_define_class("Complex", rb_cNumeric); rb_define_alloc_func(rb_cComplex, nucomp_s_alloc); rb_undef_method(CLASS_OF(rb_cComplex), "allocate"); @@ -1415,7 +1411,7 @@ rb_define_singleton_method(rb_cComplex, "rect", nucomp_s_new, -1); rb_define_singleton_method(rb_cComplex, "polar", nucomp_s_polar, 2); - rb_define_global_function(COMPLEX_NAME, nucomp_f_complex, -1); + rb_define_global_function("Complex", nucomp_f_complex, -1); rb_undef_method(rb_cComplex, "<"); rb_undef_method(rb_cComplex, "<="); Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23803) +++ ruby_1_9_1/ChangeLog (revision 23804) @@ -1,3 +1,9 @@ +Fri Jun 19 20:44:45 2009 Tadayoshi Funaba <tadf@d...> + + * complex.c: constant COMPLEX_NAME has been removed. + + * rational.c: constant RATIONAL_NAME has been removed. + Fri Jun 19 17:04:59 2009 Yukihiro Matsumoto <matz@r...> * numeric.c (flo_cmp): should always return nil for NaN. Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 23803) +++ ruby_1_9_1/version.h (revision 23804) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-22" -#define RUBY_PATCHLEVEL 194 +#define RUBY_PATCHLEVEL 195 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/rational.c =================================================================== --- ruby_1_9_1/rational.c (revision 23803) +++ ruby_1_9_1/rational.c (revision 23804) @@ -16,10 +16,6 @@ #define NDEBUG #include <assert.h> -#ifndef RATIONAL_NAME -#define RATIONAL_NAME "Rational" -#endif - #define ZERO INT2FIX(0) #define ONE INT2FIX(1) #define TWO INT2FIX(2) @@ -1568,7 +1564,7 @@ ml = (long)(log(DBL_MAX) / log(2.0) - 1); - rb_cRational = rb_define_class(RATIONAL_NAME, rb_cNumeric); + rb_cRational = rb_define_class("Rational", rb_cNumeric); rb_define_alloc_func(rb_cRational, nurat_s_alloc); rb_undef_method(CLASS_OF(rb_cRational), "allocate"); @@ -1580,7 +1576,7 @@ rb_undef_method(CLASS_OF(rb_cRational), "new"); #endif - rb_define_global_function(RATIONAL_NAME, nurat_f_rational, -1); + rb_define_global_function("Rational", nurat_f_rational, -1); rb_define_method(rb_cRational, "numerator", nurat_numerator, 0); rb_define_method(rb_cRational, "denominator", nurat_denominator, 0); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/