summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 19:20:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-03 19:20:36 +0000
commit14b56401d1557e1f166c91070ba9a85025dca71c (patch)
tree35fde476b895811355b12a7751248f422259ad47 /load.c
parent9a12b5ae94357ace093772c59b6b46f7116db517 (diff)
downloadruby-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.c5
1 files changed, 4 insertions, 1 deletions
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