Skip to content

Commit d0c8e9c

Browse files
committed
Fix for Ruby 2.4
1 parent 9933961 commit d0c8e9c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lib/iruby/display.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,12 @@ def inspect
216216
class TypeFormatMatcher < FormatMatcher
217217
def initialize(class_block)
218218
super() do |obj|
219-
self.klass === obj
220-
# We have to rescue all exceptions since constant autoloading could fail with a different error
221-
rescue Exception
222-
false
219+
begin
220+
self.klass === obj
221+
# We have to rescue all exceptions since constant autoloading could fail with a different error
222+
rescue Exception
223+
false
224+
end
223225
end
224226
@class_block = class_block
225227
end

0 commit comments

Comments
 (0)