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

ruby-changes:35435

From: normal <ko1@a...>
Date: Wed, 10 Sep 2014 18:00:17 +0900 (JST)
Subject: [ruby-changes:35435] normal:r47517 (trunk): variable.c (rb_ivar_set): remove unnecessary check

normal	2014-09-10 18:00:06 +0900 (Wed, 10 Sep 2014)

  New Revision: 47517

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

  Log:
    variable.c (rb_ivar_set): remove unnecessary check
    
    r47512 contains the proper fix

  Modified files:
    trunk/variable.c
Index: variable.c
===================================================================
--- variable.c	(revision 47516)
+++ variable.c	(revision 47517)
@@ -1175,9 +1175,6 @@ rb_ivar_set(VALUE obj, ID id, VALUE val) https://github.com/ruby/ruby/blob/trunk/variable.c#L1175
                     newsize = iv_index_tbl->num_entries;
                 }
 
-                /* never happens in practice: */
-                if (newsize > INT_MAX) rb_memerror();
-
                 if (RBASIC(obj)->flags & ROBJECT_EMBED) {
                     newptr = ALLOC_N(VALUE, newsize);
                     MEMCPY(newptr, ptr, VALUE, len);

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

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