summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-04 02:02:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-04 02:02:32 +0000
commitffb1a5d8017a5b331c26f2df985e8cf8fb0bf9e6 (patch)
treec208d8e3c34d519de7c5654a7990f97b91697021
parentd785c36b885f2cee8353954b87cf5624d387a769 (diff)
Revert r57229 and finally giving up backporting [Bug #13043]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--eval.c5
-rw-r--r--test/ruby/test_exception.rb20
-rw-r--r--version.h10
4 files changed, 6 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 8f6f8d983d..41eb04b2b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,3 @@
-Thu Dec 29 06:00:08 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
-
- * eval.c (exc_setup_cause): always set cause of cause to get rid
- of circular references. [ruby-core:78688] [Bug #13043]
-
Tue Dec 27 20:43:54 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
* time.c (usec2subsecx): fix return type, which is a numeric object but
diff --git a/eval.c b/eval.c
index 43d1948f2f..fbd28565ed 100644
--- a/eval.c
+++ b/eval.c
@@ -466,11 +466,8 @@ exc_setup_cause(VALUE exc, VALUE cause)
}
}
#endif
- if (!NIL_P(cause) && cause != exc && BUILTIN_TYPE(cause) != T_NODE) {
+ if (!NIL_P(cause) && cause != exc) {
rb_ivar_set(exc, id_cause, cause);
- if (!rb_ivar_defined(cause, id_cause)) {
- rb_ivar_set(cause, id_cause, Qnil);
- }
}
return exc;
}
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb
index 0e0179fd5f..3268096463 100644
--- a/test/ruby/test_exception.rb
+++ b/test/ruby/test_exception.rb
@@ -717,26 +717,6 @@ end.join
assert_equal({}, e.arg, bug)
end
- def test_circular_cause
- bug13043 = '[ruby-core:78688] [Bug #13043]'
- begin
- begin
- raise "error 1"
- ensure
- orig_error = $!
- begin
- raise "error 2"
- rescue => err
- raise orig_error
- end
- end
- rescue => x
- end
- assert_equal(orig_error, x)
- assert_equal(orig_error, err.cause)
- assert_nil(orig_error.cause, bug13043)
- end
-
def test_anonymous_message
assert_in_out_err([], "raise Class.new(RuntimeError), 'foo'", [], /foo\n/)
end
diff --git a/version.h b/version.h
index ed93db84f7..0c463b26ee 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.2.7"
-#define RUBY_RELEASE_DATE "2016-12-29"
-#define RUBY_PATCHLEVEL 417
+#define RUBY_RELEASE_DATE "2017-01-04"
+#define RUBY_PATCHLEVEL 418
-#define RUBY_RELEASE_YEAR 2016
-#define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 29
+#define RUBY_RELEASE_YEAR 2017
+#define RUBY_RELEASE_MONTH 1
+#define RUBY_RELEASE_DAY 4
#include "ruby/version.h"