Skip to content

Commit 9029faa

Browse files
committed
! Fix CI due to changed #inspect output
1 parent 2f8dd91 commit 9029faa

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

features/builtin_contracts/none.feature

+15-9
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Feature: None
2626
def autorescue
2727
yield
2828
rescue => e
29-
puts e.inspect
29+
# Since ruby 3.2 the `#inspect` output becomes a bit different
30+
puts e.inspect.gsub(/^#</, "").gsub(/Error:\"/, "Error: ")
3031
end
3132
"""
3233
Given a file named "none_usage.rb" with:
@@ -42,6 +43,11 @@ Feature: None
4243
def self.a_symbol(*args)
4344
:a_symbol
4445
end
46+
47+
Contract C::None => Symbol
48+
def a_symbol(*args)
49+
:a_symbol
50+
end
4551
end
4652
"""
4753

@@ -61,14 +67,14 @@ Feature: None
6167
Given a file named "anything.rb" with:
6268
"""ruby
6369
require "./none_usage"
64-
autorescue { Example.a_symbol(nil) }
65-
autorescue { Example.a_symbol(12) }
66-
autorescue { Example.a_symbol(37.5) }
67-
autorescue { Example.a_symbol("foo") }
68-
autorescue { Example.a_symbol(:foo) }
69-
autorescue { Example.a_symbol({}) }
70-
autorescue { Example.a_symbol([]) }
71-
autorescue { Example.a_symbol(Object) }
70+
autorescue { Example.new.a_symbol(nil) }
71+
autorescue { Example.new.a_symbol(12) }
72+
autorescue { Example.new.a_symbol(37.5) }
73+
autorescue { Example.new.a_symbol("foo") }
74+
autorescue { Example.new.a_symbol(:foo) }
75+
autorescue { Example.new.a_symbol({}) }
76+
autorescue { Example.new.a_symbol([]) }
77+
autorescue { Example.new.a_symbol(Object) }
7278
"""
7379
When I run `ruby anything.rb`
7480

0 commit comments

Comments
 (0)