ruby-changes:32789
From: naruse <ko1@a...>
Date: Fri, 7 Feb 2014 04:21:50 +0900 (JST)
Subject: [ruby-changes:32789] naruse:r44868 (ruby_2_1): merge revision(s) 44861, 44862: [Backport #9493]
naruse 2014-02-07 04:21:40 +0900 (Fri, 07 Feb 2014) New Revision: 44868 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44868 Log: merge revision(s) 44861,44862: [Backport #9493] * 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. * gc.c (get_envparam_int): accept a value equals to lowerbound. * gc.c (get_envparam_int): correct warning messsages. * gc.c (get_envparam_double): ditto. Modified directories: branches/ruby_2_1/ Modified files: branches/ruby_2_1/ChangeLog branches/ruby_2_1/gc.c branches/ruby_2_1/version.h Index: ruby_2_1/ChangeLog =================================================================== --- ruby_2_1/ChangeLog (revision 44867) +++ ruby_2_1/ChangeLog (revision 44868) @@ -1,3 +1,17 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1 +Fri Feb 7 04:19:19 2014 Koichi Sasada <ko1@a...> + + * gc.c (get_envparam_int): correct warning messsages. + + * gc.c (get_envparam_double): ditto. + +Fri Feb 7 04:19:19 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 08:23:28 2014 Eric Wong <e@8...> * ext/thread/thread.c (rb_szqueue_max_set): use correct queue and @@ -18,7 +32,7 @@ Thu Feb 6 11:23:59 2014 Koichi Sasada https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L32 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: ruby_2_1/gc.c =================================================================== --- ruby_2_1/gc.c (revision 44867) +++ ruby_2_1/gc.c (revision 44868) @@ -5649,13 +5649,13 @@ get_envparam_int(const char *name, unsig https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L5649 if (ptr != NULL) { val = atoi(ptr); - if (val >= lower_bound) { - if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d)\n", name, val, *default_value); + if (val > lower_bound) { + if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (default value: %d)\n", name, val, *default_value); *default_value = val; return 1; } else { - if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (%d), but ignored because lower than %d\n", name, val, *default_value, lower_bound); + if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%d (default value: %d) is ignored because it must be greater than %d.\n", name, val, *default_value, lower_bound); } } return 0; @@ -5669,13 +5669,13 @@ get_envparam_double(const char *name, do https://github.com/ruby/ruby/blob/trunk/ruby_2_1/gc.c#L5669 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; } else { - if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (%f), but ignored because lower than %f\n", name, val, *default_value, lower_bound); + if (RTEST(ruby_verbose)) fprintf(stderr, "%s=%f (default value: %f) is ignored because it must be greater than %f.\n", name, val, *default_value, lower_bound); } } return 0; Index: ruby_2_1/version.h =================================================================== --- ruby_2_1/version.h (revision 44867) +++ ruby_2_1/version.h (revision 44868) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1 #define RUBY_VERSION "2.1.1" #define RUBY_RELEASE_DATE "2014-02-07" -#define RUBY_PATCHLEVEL 27 +#define RUBY_PATCHLEVEL 28 #define RUBY_RELEASE_YEAR 2014 #define RUBY_RELEASE_MONTH 2 Property changes on: ruby_2_1 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r44861-44862 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/