[前][次][番号順一覧][スレッド一覧]

ruby-changes:36621

From: nobu <ko1@a...>
Date: Thu, 4 Dec 2014 04:20:55 +0900 (JST)
Subject: [ruby-changes:36621] nobu:r48702 (trunk): load.c: reset errinfo

nobu	2014-12-04 04:20:36 +0900 (Thu, 04 Dec 2014)

  New Revision: 48702

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48702

  Log:
    load.c: reset errinfo
    
    * load.c (ruby_require_internal): ignore error detail, just return
      an error.

  Modified files:
    trunk/ChangeLog
    trunk/load.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48701)
+++ ChangeLog	(revision 48702)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Dec  4 04:20:34 2014  Nobuyoshi Nakada  <nobu@r...>
+
+	* load.c (ruby_require_internal): ignore error detail, just return
+	  an error.
+
 Wed Dec  3 17:13:24 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* encoding.c (load_encoding): use rb_require_internal instead of
Index: load.c
===================================================================
--- load.c	(revision 48701)
+++ load.c	(revision 48702)
@@ -1040,7 +1040,10 @@ ruby_require_internal(const char *fname, https://github.com/ruby/ruby/blob/trunk/load.c#L1040
 {
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]