ruby-changes:32782
From: ko1 <ko1@a...>
Date: Thu, 6 Feb 2014 15:26:05 +0900 (JST)
Subject: [ruby-changes:32782] ko1:r44861 (trunk): * gc.c (get_envparam_int): don't accept a value equals to lowerbound
ko1 2014-02-06 15:26:01 +0900 (Thu, 06 Feb 2014) New Revision: 44861 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44861 Log: * gc.c (get_envparam_int): don't accept a value equals to lowerbound (changed by last commit) because "" or "foo" (not a number) strings are parsed as 0. They should be rejected. * gc.c (get_envparam_double): ditto. Modified files: trunk/ChangeLog trunk/gc.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44860) +++ ChangeLog (revision 44861) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Feb 6 15:17:30 2014 Koichi Sasada <ko1@a...> + + * gc.c (get_envparam_int): don't accept a value equals to lowerbound + (changed by last commit) because "" or "foo" (not a number) strings + are parsed as 0. They should be rejected. + + * gc.c (get_envparam_double): ditto. + Thu Feb 6 09:00:35 2014 Koichi Sasada <ko1@a...> * gc.c (ruby_gc_set_params): if RUBY_GC_OLDMALLOC_LIMIT is provided, @@ -5,7 +13,7 @@ Thu Feb 6 09:00:35 2014 Koichi Sasada https://github.com/ruby/ruby/blob/trunk/ChangeLog#L13 Without this fix, the env variable RUBY_GC_OLDMALLOC_LIMIT does not work. - * gc.c (get_envparam_int): accept a value equals to lowerbounds. + * gc.c (get_envparam_int): accept a value equals to lowerbound. * gc.c (get_envparam_double): ditto. Index: gc.c =================================================================== --- gc.c (revision 44860) +++ gc.c (revision 44861) @@ -5653,7 +5653,7 @@ get_envparam_int(const char *name, unsig https://github.com/ruby/ruby/blob/trunk/gc.c#L5653 if (ptr != NULL) { val = atoi(ptr); - if (val >= lower_bound) { + if (val > lower_bound) { if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d)\n", name, val, *default_value); *default_value = val; return 1; @@ -5673,7 +5673,7 @@ get_envparam_double(const char *name, do https://github.com/ruby/ruby/blob/trunk/gc.c#L5673 if (ptr != NULL) { val = strtod(ptr, NULL); - if (val >= lower_bound) { + if (val > lower_bound) { if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (%f)\n", name, val, *default_value); *default_value = val; return 1; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/