summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-19 21:24:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-19 21:24:30 +0000
commit3b36c8da5c923445787dde6098faae8c0627bc54 (patch)
treeb8efb3e901e717b9994b64122e7d1cf85269e425 /gc.c
parent56b6eed32320c4793ee105d5bf23041804d0a0e3 (diff)
merge revision(s) 44327: [Backport #9276]
* gc.c (ruby_gc_set_params): don't show obsolete warnings for RUBY_FREE_MIN/RUBY_HEAP_MIN_SLOTS if RUBY_GC_HEAP_FREE_SLOTS/RUBY_GC_HEAP_INIT_SLOTS are given. [Bug #9276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gc.c b/gc.c
index bcf4769b7f..2762db4529 100644
--- a/gc.c
+++ b/gc.c
@@ -5737,17 +5737,19 @@ ruby_gc_set_params(int safe_level)
if (safe_level > 0) return;
/* RUBY_GC_HEAP_FREE_SLOTS */
- if (get_envparam_int ("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) {
+ if (get_envparam_int("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0)) {
+ /* ok */
+ }
+ else if (get_envparam_int("RUBY_FREE_MIN", &gc_params.heap_free_slots, 0)) {
rb_warn("RUBY_FREE_MIN is obsolete. Use RUBY_GC_HEAP_FREE_SLOTS instead.");
}
- get_envparam_int ("RUBY_GC_HEAP_FREE_SLOTS", &gc_params.heap_free_slots, 0);
/* RUBY_GC_HEAP_INIT_SLOTS */
- if (get_envparam_int("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) {
- rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.");
+ if (get_envparam_int("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) {
gc_set_initial_pages();
}
- if (get_envparam_int("RUBY_GC_HEAP_INIT_SLOTS", &gc_params.heap_init_slots, 0)) {
+ else if (get_envparam_int("RUBY_HEAP_MIN_SLOTS", &gc_params.heap_init_slots, 0)) {
+ rb_warn("RUBY_HEAP_MIN_SLOTS is obsolete. Use RUBY_GC_HEAP_INIT_SLOTS instead.");
gc_set_initial_pages();
}