File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,20 @@ Init_fiddle(void)
141
141
*/
142
142
rb_eFiddleError = rb_define_class_under (mFiddle , "Error" , rb_eStandardError );
143
143
144
+ /*
145
+ * Ruby installed by RubyInstaller for Windows always require
146
+ * bundled Fiddle because ruby_installer/runtime/dll_directory.rb
147
+ * requires Fiddle. It's used by
148
+ * rubygems/defaults/operating_system.rb. It means that the
149
+ * bundled Fiddle is always required on initialization.
150
+ *
151
+ * We just remove existing Fiddle::DLError here to override
152
+ * the bundled Fiddle.
153
+ */
154
+ if (rb_const_defined (mFiddle , rb_intern ("DLError" ))) {
155
+ rb_const_remove (mFiddle , rb_intern ("DLError" ));
156
+ }
157
+
144
158
/*
145
159
* Document-class: Fiddle::DLError
146
160
*
You can’t perform that action at this time.
0 commit comments