diff --git a/spec/tags/core/array/try_convert_tags.txt b/spec/tags/core/array/try_convert_tags.txt deleted file mode 100644 index 7b6157fd6..000000000 --- a/spec/tags/core/array/try_convert_tags.txt +++ /dev/null @@ -1 +0,0 @@ -fails:Array.try_convert does not rescue exceptions raised by #to_ary diff --git a/spec/tags/core/hash/try_convert_tags.txt b/spec/tags/core/hash/try_convert_tags.txt deleted file mode 100644 index b0c0d9ef1..000000000 --- a/spec/tags/core/hash/try_convert_tags.txt +++ /dev/null @@ -1 +0,0 @@ -fails:Hash.try_convert does not rescue exceptions raised by #to_hash diff --git a/topaz/objspace.py b/topaz/objspace.py index e58a37f0f..7a1ccf20c 100644 --- a/topaz/objspace.py +++ b/topaz/objspace.py @@ -702,7 +702,9 @@ def convert_type(self, w_obj, w_cls, method, raise_error=True): try: w_res = self.send(w_obj, method) - except RubyError: + except RubyError as e: + if not isinstance(e.w_value, W_NoMethodError): + raise if not raise_error: return self.w_nil src_cls_name = self.obj_to_s(self.getclass(w_obj))