diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-03 19:20:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-03 19:20:36 +0000 |
commit | 14b56401d1557e1f166c91070ba9a85025dca71c (patch) | |
tree | 35fde476b895811355b12a7751248f422259ad47 /load.c | |
parent | 9a12b5ae94357ace093772c59b6b46f7116db517 (diff) | |
download | ruby-14b56401d1557e1f166c91070ba9a85025dca71c.tar.gz |
load.c: reset errinfo
* load.c (ruby_require_internal): ignore error detail, just return
an error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r-- | load.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |