diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-06 19:21:40 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-02-06 19:21:40 +0000 |
commit | 73fc780998054e9ca4835b784b6fc9051f83332f (patch) | |
tree | d0eb032887b9773dd2c61b0d519d1e037b71fe00 | |
parent | 5d0f801aaef21df2d704993d99c623d72a11ae33 (diff) |
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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | gc.c | 10 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 21 insertions, 7 deletions
@@ -1,3 +1,17 @@ +Fri Feb 7 04:19:19 2014 Koichi Sasada <ko1@atdot.net> + + * gc.c (get_envparam_int): correct warning messsages. + + * gc.c (get_envparam_double): ditto. + +Fri Feb 7 04:19:19 2014 Koichi Sasada <ko1@atdot.net> + + * 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@80x24.org> * 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 <ko1@atdot.net> 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. @@ -5649,13 +5649,13 @@ get_envparam_int(const char *name, unsigned int *default_value, int lower_bound) 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, double *default_value, double lower_bound) 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; @@ -1,6 +1,6 @@ #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 |