Skip to content

Commit f8728eb

Browse files
committed
test: relax the regexp to make the test pass on 2.1.x
1 parent 6829b41 commit f8728eb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: test/test_fast_method_source/test_fast_method_source_source_for.rb

+2-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_source_for_irb_change_workspace
6969
require 'irb'
7070

7171
method = IRB::ExtendCommandBundle.instance_method(:irb_change_workspace)
72-
expected = /def \#{cmd_name}\(\*opts, &b\).+\*opts, &b\n\s+end\n\z/m
72+
expected = /def \#{cmd_name}\(\*opts, &b\).+\n\s+end\n\z/m
7373
assert_match(expected, FastMethodSource.source_for(method))
7474
end
7575

@@ -78,8 +78,7 @@ def test_source_for_rss_time_w3cdtf
7878

7979
method = Time.instance_method(:w3cdtf)
8080
expected = /def w3cdtf\n if usec.zero\?\n.+end\n\z/m
81-
assert_match(expected,
82-
FastMethodSource.source_for(method))
81+
assert_match(expected, FastMethodSource.source_for(method))
8382
end
8483

8584
def test_source_for_kernel_require

0 commit comments

Comments
 (0)