diff --git a/ChangeLog b/ChangeLog index 24008a949b..fe96d429fb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 4 04:20:34 2014 Nobuyoshi Nakada + + * load.c (ruby_require_internal): ignore error detail, just return + an error. + Wed Dec 3 17:13:24 2014 Nobuyoshi Nakada * encoding.c (load_encoding): use rb_require_internal instead of diff --git a/load.c b/load.c index 4f1a0c1a78..65017c9895 100644 --- a/load.c +++ b/load.c @@ -1040,7 +1040,10 @@ ruby_require_internal(const char *fname, unsigned int len) { struct RString fake; VALUE str = rb_setup_fake_str(&fake, fname, len, 0); - return rb_require_internal(str, 0); + int result = rb_require_internal(str, 0); + if (result > 1) result = -1; + rb_set_errinfo(Qnil); + return result; } VALUE