mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/fiddle] Add workaround for RubyInstaller for Windows
See comment for details.
0c76f03dc4
This commit is contained in:
parent
307388ea19
commit
aff5eaced4
Notes:
git
2020-11-18 09:05:46 +09:00
1 changed files with 14 additions and 0 deletions
|
@ -141,6 +141,20 @@ Init_fiddle(void)
|
||||||
*/
|
*/
|
||||||
rb_eFiddleError = rb_define_class_under(mFiddle, "Error", rb_eStandardError);
|
rb_eFiddleError = rb_define_class_under(mFiddle, "Error", rb_eStandardError);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ruby installed by RubyInstaller for Windows always require
|
||||||
|
* bundled Fiddle because ruby_installer/runtime/dll_directory.rb
|
||||||
|
* requires Fiddle. It's used by
|
||||||
|
* rubygems/defaults/operating_system.rb. It means that the
|
||||||
|
* bundled Fiddle is always required on initialization.
|
||||||
|
*
|
||||||
|
* We just remove existing Fiddle::DLError here to override
|
||||||
|
* the bundled Fiddle.
|
||||||
|
*/
|
||||||
|
if (rb_const_defined(mFiddle, rb_intern("DLError"))) {
|
||||||
|
rb_const_remove(mFiddle, rb_intern("DLError"));
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Document-class: Fiddle::DLError
|
* Document-class: Fiddle::DLError
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue