summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 1 insertions, 4 deletions
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;
}