ruby-changes:33153
From: normal <ko1@a...>
Date: Sun, 2 Mar 2014 10:49:23 +0900 (JST)
Subject: [ruby-changes:33153] normal:r45232 (trunk): load.c (ruby_init_ext): make idempotent to suppress warnings
normal 2014-03-02 10:49:15 +0900 (Sun, 02 Mar 2014) New Revision: 45232 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45232 Log: load.c (ruby_init_ext): make idempotent to suppress warnings Modified files: trunk/ChangeLog trunk/load.c Index: ChangeLog =================================================================== --- ChangeLog (revision 45231) +++ ChangeLog (revision 45232) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Mar 2 10:47:58 2014 Eric Wong <e@8...> + + * load.c (ruby_init_ext): make idempotent to suppress warnings + Sat Mar 1 19:51:42 2014 Tanaka Akira <akr@f...> * lib/open3.rb (Open3.capture3): Ignore Errno::EPIPE for writing Index: load.c =================================================================== --- load.c (revision 45231) +++ load.c (revision 45232) @@ -1059,10 +1059,13 @@ ruby_init_ext(const char *name, void (*i https://github.com/ruby/ruby/blob/trunk/load.c#L1059 { 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); } /* -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/