Skip to content
Browse files

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
  • Loading branch information...
1 parent 9db0dd7 commit 8120b188627c610a2040c47e89d825a8bb1e564d normal committed Mar 2, 2014
Showing with 7 additions and 0 deletions.
  1. +4 −0 ChangeLog
  2. +3 −0 load.c
View
4 ChangeLog
@@ -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
View
3 load.c
@@ -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);
}
/*

0 comments on commit 8120b18

Please sign in to comment.
Something went wrong with that request. Please try again.