diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-02 01:49:15 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-02 01:49:15 +0000 |
commit | 8120b188627c610a2040c47e89d825a8bb1e564d (patch) | |
tree | 90835a0cef6274f9bf1703dd9f25f7102ffbf990 | |
parent | 9db0dd7bb9562c2c21d651879bf5dc43e2cc5d2f (diff) |
load.c (ruby_init_ext): make idempotent to suppress warnings
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | load.c | 3 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Sun Mar 2 10:47:58 2014 Eric Wong <e@80x24.org> + + * load.c (ruby_init_ext): make idempotent to suppress warnings + Sat Mar 1 19:51:42 2014 Tanaka Akira <akr@fsij.org> * lib/open3.rb (Open3.capture3): Ignore Errno::EPIPE for writing @@ -1059,10 +1059,13 @@ ruby_init_ext(const char *name, void (*init)(void)) { st_table *loading_tbl = get_loading_table(); + if (rb_provided(name)) + return; if (!loading_tbl) { GET_VM()->loading_table = loading_tbl = st_init_strtable(); } st_update(loading_tbl, (st_data_t)name, register_init_ext, (st_data_t)init); + rb_provide(name); } /* |