[前][次][番号順一覧][スレッド一覧]

ruby-changes:34954

From: nagachika <ko1@a...>
Date: Sun, 3 Aug 2014 00:25:29 +0900 (JST)
Subject: [ruby-changes:34954] nagachika:r47036 (ruby_2_1): merge revision(s) r44577, r45097, r45330, r45331, r45354, r45356: [Backport #10033]

nagachika	2014-08-03 00:25:17 +0900 (Sun, 03 Aug 2014)

  New Revision: 47036

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=47036

  Log:
    merge revision(s) r44577,r45097,r45330,r45331,r45354,r45356: [Backport #10033]
    
    cptr.c: unused variable
    
    * ext/dl/cptr.c (rb_dlptr_inspect): remove no longer used variable.

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/bignum.c
    branches/ruby_2_1/complex.c
    branches/ruby_2_1/enc/utf_16be.c
    branches/ruby_2_1/enc/utf_16le.c
    branches/ruby_2_1/ext/date/date_core.c
    branches/ruby_2_1/ext/dl/cptr.c
    branches/ruby_2_1/ext/json/parser/parser.c
    branches/ruby_2_1/ext/json/parser/prereq.mk
    branches/ruby_2_1/gc.c
    branches/ruby_2_1/range.c
    branches/ruby_2_1/rational.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/complex.c
===================================================================
--- ruby_2_1/complex.c	(revision 47035)
+++ ruby_2_1/complex.c	(revision 47036)
@@ -18,10 +18,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L18
 
 VALUE rb_cComplex;
 
-static ID id_abs, id_abs2, id_arg, id_cmp, id_conj, id_convert,
-    id_denominator, id_divmod, id_eqeq_p, id_expt, id_fdiv,  id_floor,
-    id_idiv, id_imag, id_inspect, id_negate, id_numerator, id_quo,
-    id_real, id_real_p, id_to_f, id_to_i, id_to_r, id_to_s,
+static ID id_abs, id_arg, id_convert,
+    id_denominator, id_eqeq_p, id_expt, id_fdiv,
+    id_inspect, id_negate, id_numerator, id_quo,
+    id_real_p, id_to_f, id_to_i, id_to_r, id_to_s,
     id_i_real, id_i_imag;
 
 #define f_boolcast(x) ((x) ? Qtrue : Qfalse)
@@ -76,20 +76,6 @@ f_add(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L76
 }
 
 inline static VALUE
-f_cmp(VALUE x, VALUE y)
-{
-    if (FIXNUM_P(x) && FIXNUM_P(y)) {
-	long c = FIX2LONG(x) - FIX2LONG(y);
-	if (c > 0)
-	    c = 1;
-	else if (c < 0)
-	    c = -1;
-	return INT2FIX(c);
-    }
-    return rb_funcall(x, id_cmp, 1, y);
-}
-
-inline static VALUE
 f_div(VALUE x, VALUE y)
 {
     if (FIXNUM_P(y) && FIX2LONG(y) == 1)
@@ -106,16 +92,6 @@ f_gt_p(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L92
 }
 
 inline static VALUE
-f_lt_p(VALUE x, VALUE y)
-{
-    if (FIXNUM_P(x) && FIXNUM_P(y))
-	return f_boolcast(FIX2LONG(x) < FIX2LONG(y));
-    return rb_funcall(x, '<', 1, y);
-}
-
-binop(mod, '%')
-
-inline static VALUE
 f_mul(VALUE x, VALUE y)
 {
 #ifndef PRESERVE_SIGNEDZERO
@@ -152,16 +128,11 @@ f_sub(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L128
 }
 
 fun1(abs)
-fun1(abs2)
 fun1(arg)
-fun1(conj)
 fun1(denominator)
-fun1(floor)
-fun1(imag)
 fun1(inspect)
 fun1(negate)
 fun1(numerator)
-fun1(real)
 fun1(real_p)
 
 inline static VALUE
@@ -182,8 +153,6 @@ f_to_f(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L153
 fun1(to_r)
 fun1(to_s)
 
-fun2(divmod)
-
 inline static VALUE
 f_eqeq_p(VALUE x, VALUE y)
 {
@@ -194,7 +163,6 @@ f_eqeq_p(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L163
 
 fun2(expt)
 fun2(fdiv)
-fun2(idiv)
 fun2(quo)
 
 inline static VALUE
@@ -258,12 +226,6 @@ k_numeric_p(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L226
 }
 
 inline static VALUE
-k_integer_p(VALUE x)
-{
-    return f_kind_of_p(x, rb_cInteger);
-}
-
-inline static VALUE
 k_fixnum_p(VALUE x)
 {
     return f_kind_of_p(x, rb_cFixnum);
@@ -457,13 +419,6 @@ nucomp_s_new(int argc, VALUE *argv, VALU https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L419
 }
 
 inline static VALUE
-f_complex_new1(VALUE klass, VALUE x)
-{
-    assert(!k_complex_p(x));
-    return nucomp_s_canonicalize_internal(klass, x, ZERO);
-}
-
-inline static VALUE
 f_complex_new2(VALUE klass, VALUE x, VALUE y)
 {
     assert(!k_complex_p(x));
@@ -537,7 +492,6 @@ m_log_bang(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L492
 
 imp1(sin)
 imp1(sinh)
-imp1(sqrt)
 
 static VALUE
 m_cos(VALUE x)
@@ -570,6 +524,8 @@ m_sin(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L524
 }
 
 #if 0
+imp1(sqrt)
+
 static VALUE
 m_sqrt(VALUE x)
 {
@@ -2098,24 +2054,16 @@ Init_Complex(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/complex.c#L2054
     assert(fprintf(stderr, "assert() is now active\n"));
 
     id_abs = rb_intern("abs");
-    id_abs2 = rb_intern("abs2");
     id_arg = rb_intern("arg");
-    id_cmp = rb_intern("<=>");
-    id_conj = rb_intern("conj");
     id_convert = rb_intern("convert");
     id_denominator = rb_intern("denominator");
-    id_divmod = rb_intern("divmod");
     id_eqeq_p = rb_intern("==");
     id_expt = rb_intern("**");
     id_fdiv = rb_intern("fdiv");
-    id_floor = rb_intern("floor");
-    id_idiv = rb_intern("div");
-    id_imag = rb_intern("imag");
     id_inspect = rb_intern("inspect");
     id_negate = rb_intern("-@");
     id_numerator = rb_intern("numerator");
     id_quo = rb_intern("quo");
-    id_real = rb_intern("real");
     id_real_p = rb_intern("real?");
     id_to_f = rb_intern("to_f");
     id_to_i = rb_intern("to_i");
Index: ruby_2_1/enc/utf_16be.c
===================================================================
--- ruby_2_1/enc/utf_16be.c	(revision 47035)
+++ ruby_2_1/enc/utf_16be.c	(revision 47036)
@@ -33,6 +33,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/enc/utf_16be.c#L33
 #define UTF16_IS_SURROGATE_SECOND(c)   (((c) & 0xfc) == 0xdc)
 #define UTF16_IS_SURROGATE(c)          (((c) & 0xf8) == 0xd8)
 
+#if 0
 static const int EncLen_UTF16[] = {
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -51,6 +52,7 @@ static const int EncLen_UTF16[] = { https://github.com/ruby/ruby/blob/trunk/ruby_2_1/enc/utf_16be.c#L52
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
 };
+#endif
 
 static int
 utf16be_mbc_enc_len(const UChar* p, const OnigUChar* e ARG_UNUSED,
Index: ruby_2_1/enc/utf_16le.c
===================================================================
--- ruby_2_1/enc/utf_16le.c	(revision 47035)
+++ ruby_2_1/enc/utf_16le.c	(revision 47036)
@@ -33,6 +33,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/enc/utf_16le.c#L33
 #define UTF16_IS_SURROGATE_SECOND(c)   (((c) & 0xfc) == 0xdc)
 #define UTF16_IS_SURROGATE(c)          (((c) & 0xf8) == 0xd8)
 
+#if 0
 static const int EncLen_UTF16[] = {
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -51,6 +52,7 @@ static const int EncLen_UTF16[] = { https://github.com/ruby/ruby/blob/trunk/ruby_2_1/enc/utf_16le.c#L52
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
 };
+#endif
 
 static int
 utf16le_mbc_enc_len(const UChar* p, const OnigUChar* e,
Index: ruby_2_1/range.c
===================================================================
--- ruby_2_1/range.c	(revision 47035)
+++ ruby_2_1/range.c	(revision 47036)
@@ -31,13 +31,6 @@ static ID id_cmp, id_succ, id_beg, id_en https://github.com/ruby/ruby/blob/trunk/ruby_2_1/range.c#L31
 #define RBOOL(v) ((v) ? Qtrue : Qfalse)
 
 #define EXCL(r) RTEST(RANGE_EXCL(r))
-static inline VALUE
-SET_EXCL(VALUE r, VALUE v)
-{
-    v = RBOOL(RTEST(v));
-    RANGE_SET_EXCL(r, v);
-    return v;
-}
 
 static VALUE
 range_failed(void)
Index: ruby_2_1/gc.c
===================================================================
--- ruby_2_1/gc.c	(revision 47035)
+++ ruby_2_1/gc.c	(revision 47036)
@@ -4505,8 +4505,8 @@ gc_marks(rb_objspace_t *objspace, int fu https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L4505
 	    {
 		/* See the comment about RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR */
 		const double r = gc_params.oldobject_limit_factor;
-		objspace->rgengc.remembered_shady_object_limit = objspace->rgengc.remembered_shady_object_count * r;
-		objspace->rgengc.old_object_limit = objspace->rgengc.old_object_count * r;
+		objspace->rgengc.remembered_shady_object_limit = (size_t)(objspace->rgengc.remembered_shady_object_count * r);
+		objspace->rgengc.old_object_limit = (size_t)(objspace->rgengc.old_object_count * r);
 	    }
 	}
 	else { /* minor GC */
Index: ruby_2_1/ext/dl/cptr.c
===================================================================
--- ruby_2_1/ext/dl/cptr.c	(revision 47035)
+++ ruby_2_1/ext/dl/cptr.c	(revision 47036)
@@ -389,7 +389,6 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/dl/cptr.c#L389
 rb_dlptr_inspect(VALUE self)
 {
     struct ptr_data *data;
-    char str[1024];
 
     TypedData_Get_Struct(self, struct ptr_data, &dlptr_data_type, data);
     return rb_sprintf("#<%"PRIsVALUE":%p ptr=%p size=%ld free=%p>",
Index: ruby_2_1/ext/json/parser/prereq.mk
===================================================================
--- ruby_2_1/ext/json/parser/prereq.mk	(revision 47035)
+++ ruby_2_1/ext/json/parser/prereq.mk	(revision 47036)
@@ -4,6 +4,7 @@ RAGEL = ragel https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/prereq.mk#L4
 
 .rl.c:
 	$(RAGEL) -G2 $<
-	$(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' $@
+	$(BASERUBY) -pli -e '$$_.sub!(/[ \t]+$$/, "")' \
+	-e '$$_.sub!(/^static const int (JSON_.*=.*);$$/, "enum {\\1};")' $@
 
 parser.c:
Index: ruby_2_1/ext/json/parser/parser.c
===================================================================
--- ruby_2_1/ext/json/parser/parser.c	(revision 47035)
+++ ruby_2_1/ext/json/parser/parser.c	(revision 47036)
@@ -89,11 +89,11 @@ static ID i_json_creatable_p, i_json_cre https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L89
 
 
 #line 92 "parser.c"
-static const int JSON_object_start = 1;
-static const int JSON_object_first_final = 27;
-static const int JSON_object_error = 0;
+enum {JSON_object_start = 1};
+enum {JSON_object_first_final = 27};
+enum {JSON_object_error = 0};
 
-static const int JSON_object_en_main = 1;
+enum {JSON_object_en_main = 1};
 
 
 #line 151 "parser.rl"
@@ -467,11 +467,11 @@ case 26: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L467
 
 
 #line 470 "parser.c"
-static const int JSON_value_start = 1;
-static const int JSON_value_first_final = 21;
-static const int JSON_value_error = 0;
+enum {JSON_value_start = 1};
+enum {JSON_value_first_final = 21};
+enum {JSON_value_error = 0};
 
-static const int JSON_value_en_main = 1;
+enum {JSON_value_en_main = 1};
 
 
 #line 271 "parser.rl"
@@ -776,11 +776,11 @@ case 20: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L776
 
 
 #line 779 "parser.c"
-static const int JSON_integer_start = 1;
-static const int JSON_integer_first_final = 3;
-static const int JSON_integer_error = 0;
+enum {JSON_integer_start = 1};
+enum {JSON_integer_first_final = 3};
+enum {JSON_integer_error = 0};
 
-static const int JSON_integer_en_main = 1;
+enum {JSON_integer_en_main = 1};
 
 
 #line 295 "parser.rl"
@@ -875,11 +875,11 @@ case 5: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L875
 
 
 #line 878 "parser.c"
-static const int JSON_float_start = 1;
-static const int JSON_float_first_final = 8;
-static const int JSON_float_error = 0;
+enum {JSON_float_start = 1};
+enum {JSON_float_first_final = 8};
+enum {JSON_float_error = 0};
 
-static const int JSON_float_en_main = 1;
+enum {JSON_float_en_main = 1};
 
 
 #line 329 "parser.rl"
@@ -1041,11 +1041,11 @@ case 7: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L1041
 
 
 #line 1044 "parser.c"
-static const int JSON_array_start = 1;
-static const int JSON_array_first_final = 17;
-static const int JSON_array_error = 0;
+enum {JSON_array_start = 1};
+enum {JSON_array_first_final = 17};
+enum {JSON_array_error = 0};
 
-static const int JSON_array_en_main = 1;
+enum {JSON_array_en_main = 1};
 
 
 #line 381 "parser.rl"
@@ -1373,11 +1373,11 @@ static VALUE json_string_unescape(VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L1373
 
 
 #line 1376 "parser.c"
-static const int JSON_string_start = 1;
-static const int JSON_string_first_final = 8;
-static const int JSON_string_error = 0;
+enum {JSON_string_start = 1};
+enum {JSON_string_first_final = 8};
+enum {JSON_string_error = 0};
 
-static const int JSON_string_en_main = 1;
+enum {JSON_string_en_main = 1};
 
 
 #line 494 "parser.rl"
@@ -1730,11 +1730,11 @@ static VALUE cParser_initialize(int argc https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L1730
 
 
 #line 1733 "parser.c"
-static const int JSON_start = 1;
-static const int JSON_first_final = 10;
-static const int JSON_error = 0;
+enum {JSON_start = 1};
+enum {JSON_first_final = 10};
+enum {JSON_error = 0};
 
-static const int JSON_en_main = 1;
+enum {JSON_en_main = 1};
 
 
 #line 740 "parser.rl"
@@ -1904,11 +1904,11 @@ case 9: https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/json/parser/parser.c#L1904
 
 
 #line 1907 "parser.c"
-static const int JSON_quirks_mode_start = 1;
-static const int JSON_quirks_mode_first_final = 10;
-static const int JSON_quirks_mode_error = 0;
+enum {JSON_quirks_mode_start = 1};
+enum {JSON_quirks_mode_first_final = 10};
+enum {JSON_quirks_mode_error = 0};
 
-static const int JSON_quirks_mode_en_main = 1;
+enum {JSON_quirks_mode_en_main = 1};
 
 
 #line 778 "parser.rl"
Index: ruby_2_1/ext/date/date_core.c
===================================================================
--- ruby_2_1/ext/date/date_core.c	(revision 47035)
+++ ruby_2_1/ext/date/date_core.c	(revision 47036)
@@ -1723,23 +1723,6 @@ m_real_year(union DateData *x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/date/date_core.c#L1723
     return ry;
 }
 
-
-#ifdef USE_PACK
-inline static int
-m_pc(union DateData *x)
-{
-    if (simple_dat_p(x)) {
-	get_s_civil(x);
-	return x->s.pc;
-    }
-    else {
-	get_c_civil(x);
-	get_c_time(x);
-	return x->c.pc;
-    }
-}
-#endif
-
 inline static int
 m_mon(union DateData *x)
 {
@@ -1980,12 +1963,6 @@ k_date_p(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ext/date/date_core.c#L1963
 }
 
 inline static VALUE
-k_datetime_p(VALUE x)
-{
-    return f_kind_of_p(x, cDateTime);
-}
-
-inline static VALUE
 k_numeric_p(VALUE x)
 {
     return f_kind_of_p(x, rb_cNumeric);
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 47035)
+++ ruby_2_1/version.h	(revision 47036)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.2"
 #define RUBY_RELEASE_DATE "2014-08-03"
-#define RUBY_PATCHLEVEL 187
+#define RUBY_PATCHLEVEL 188
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 8
Index: ruby_2_1/bignum.c
===================================================================
--- ruby_2_1/bignum.c	(revision 47035)
+++ ruby_2_1/bignum.c	(revision 47036)
@@ -218,7 +218,7 @@ end https://github.com/ruby/ruby/blob/trunk/ruby_2_1/bignum.c#L218
 
  */
 
-#ifdef HAVE_UINT16_T
+#if SIZEOF_BDIGIT_DBL == 2
 static const int maxpow16_exp[35] = {
     15, 10, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3,
     3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
@@ -234,8 +234,7 @@ static const uint16_t maxpow16_num[35] = https://github.com/ruby/ruby/blob/trunk/ruby_2_1/bignum.c#L234
     U16(0x00006978), U16(0x0000745f), U16(0x00008000), U16(0x00008c61),
     U16(0x00009988), U16(0x0000a77b), U16(0x0000b640),
 };
-#endif
-#ifdef HAVE_UINT32_T
+#elif SIZEOF_BDIGIT_DBL == 4
 static const int maxpow32_exp[35] = {
     31, 20, 15, 13, 12, 11, 10, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7,
     7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
@@ -251,8 +250,7 @@ static const uint32_t maxpow32_num[35] = https://github.com/ruby/ruby/blob/trunk/ruby_2_1/bignum.c#L250
     U32(0x2b73a840), U32(0x34e63b41), U32(0x40000000), U32(0x4cfa3cc1),
     U32(0x5c13d840), U32(0x6d91b519), U32(0x81bf1000),
 };
-#endif
-#ifdef HAVE_UINT64_T
+#elif SIZEOF_BDIGIT_DBL == 8 && defined HAVE_UINT64_T
 static const int maxpow64_exp[35] = {
     63, 40, 31, 27, 24, 22, 21, 20, 19, 18, 17, 17, 16, 16, 15, 15, 15,
     15, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 12, 12, 12, 12, 12,
@@ -278,8 +276,7 @@ static const uint64_t maxpow64_num[35] = https://github.com/ruby/ruby/blob/trunk/ruby_2_1/bignum.c#L276
     U64(0x211e44f7,0xd02c1000), U64(0x2ee56725,0xf06e5c71),
     U64(0x41c21cb8,0xe1000000),
 };
-#endif
-#ifdef HAVE_UINT128_T
+#elif SIZEOF_BDIGIT_DBL == 16 && defined HAVE_UINT128_T
 static const int maxpow128_exp[35] = {
     127, 80, 63, 55, 49, 45, 42, 40, 38, 37, 35, 34, 33, 32, 31, 31, 30,
     30, 29, 29, 28, 28, 27, 27, 27, 26, 26, 26, 26, 25, 25, 25, 25, 24,
Index: ruby_2_1/rational.c
===================================================================
--- ruby_2_1/rational.c	(revision 47035)
+++ ruby_2_1/rational.c	(revision 47036)
@@ -31,7 +31,7 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L31
 VALUE rb_cRational;
 
 static ID id_abs, id_cmp, id_convert, id_eqeq_p, id_expt, id_fdiv,
-    id_floor, id_idiv, id_integer_p, id_negate, id_to_f,
+    id_idiv, id_integer_p, id_negate, id_to_f,
     id_to_i, id_truncate, id_i_num, id_i_den;
 
 #define f_boolcast(x) ((x) ? Qtrue : Qfalse)
@@ -92,14 +92,6 @@ f_div(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L92
 }
 
 inline static VALUE
-f_gt_p(VALUE x, VALUE y)
-{
-    if (FIXNUM_P(x) && FIXNUM_P(y))
-	return f_boolcast(FIX2LONG(x) > FIX2LONG(y));
-    return rb_funcall(x, '>', 1, y);
-}
-
-inline static VALUE
 f_lt_p(VALUE x, VALUE y)
 {
     if (FIXNUM_P(x) && FIXNUM_P(y))
@@ -142,7 +134,6 @@ f_sub(VALUE x, VALUE y) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L134
 }
 
 fun1(abs)
-fun1(floor)
 fun1(integer_p)
 fun1(negate)
 
@@ -161,8 +152,6 @@ f_to_f(VALUE x) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L152
     return rb_funcall(x, id_to_f, 0);
 }
 
-fun1(truncate)
-
 inline static VALUE
 f_eqeq_p(VALUE x, VALUE y)
 {
@@ -474,14 +463,6 @@ f_rational_new_bang1(VALUE klass, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L463
     return nurat_s_new_internal(klass, x, ONE);
 }
 
-inline static VALUE
-f_rational_new_bang2(VALUE klass, VALUE x, VALUE y)
-{
-    assert(f_positive_p(y));
-    assert(f_nonzero_p(y));
-    return nurat_s_new_internal(klass, x, y);
-}
-
 #ifdef CANONICALIZATION_FOR_MATHN
 #define CANON
 #endif
@@ -580,13 +561,6 @@ nurat_s_new(int argc, VALUE *argv, VALUE https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L561
 }
 
 inline static VALUE
-f_rational_new1(VALUE klass, VALUE x)
-{
-    assert(!k_rational_p(x));
-    return nurat_s_canonicalize_internal(klass, x, ONE);
-}
-
-inline static VALUE
 f_rational_new2(VALUE klass, VALUE x, VALUE y)
 {
     assert(!k_rational_p(x));
@@ -595,13 +569,6 @@ f_rational_new2(VALUE klass, VALUE x, VA https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L569
 }
 
 inline static VALUE
-f_rational_new_no_reduce1(VALUE klass, VALUE x)
-{
-    assert(!k_rational_p(x));
-    return nurat_s_canonicalize_internal_no_reduce(klass, x, ONE);
-}
-
-inline static VALUE
 f_rational_new_no_reduce2(VALUE klass, VALUE x, VALUE y)
 {
     assert(!k_rational_p(x));
@@ -2532,7 +2499,6 @@ Init_Rational(void) https://github.com/ruby/ruby/blob/trunk/ruby_2_1/rational.c#L2499
     id_eqeq_p = rb_intern("==");
     id_expt = rb_intern("**");
     id_fdiv = rb_intern("fdiv");
-    id_floor = rb_intern("floor");
     id_idiv = rb_intern("div");
     id_integer_p = rb_intern("integer?");
     id_negate = rb_intern("-@");

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r44577,45097,45330-45331,45354,45356


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]