aboutsummaryrefslogtreecommitdiffstats
path: root/vm.c
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 07:21:37 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-03 07:21:37 +0000
commit5e33ea956c44c6e2670ad7cf24c2d83ef3eaa674 (patch)
treeda9df15859b791d996f4e179fe47a552a2f6f565 /vm.c
parentcc71f75b60fdf7908fb51bbb9a65aadb0c1e3b75 (diff)
downloadruby-5e33ea956c44c6e2670ad7cf24c2d83ef3eaa674.tar.gz
* vm.c: eagerly allocate `loading_table`. This eliminates the need to
do NULL checks when looking up the `loading_table` hash. https://github.com/ruby/ruby/pull/918 * load.c: remove various NULL checks git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 6b3f4fec13..0702e8a39e 100644
--- a/vm.c
+++ b/vm.c
@@ -2859,6 +2859,7 @@ Init_vm_objects(void)
/* initialize mark object array, hash */
vm->mark_object_ary = rb_ary_tmp_new(128);
+ vm->loading_table = st_init_strtable();
}
/* top self */