rubygem-flexmock/rubygem-flexmock-2.3.6-testsuite-binding-source.patch
chen-jan b442c66bc2 fix build error by upgrading to ruby3
(cherry picked from commit 167f372e457c0b817620573165b7a92c49ed5bda)
2022-03-23 10:48:04 +08:00

12 lines
449 B
Diff

--- flexmock-2.3.6/test/test_helper.rb.ruby3 2021-01-24 00:41:42.121385766 +0900
+++ flexmock-2.3.6/test/test_helper.rb 2021-01-24 00:44:25.866236105 +0900
@@ -50,7 +50,7 @@
# added.
def assert_mock_failure(klass, options={}, &block)
ex = assert_failure(klass, options, &block)
- file = eval("__FILE__", block.binding)
+ file = block.binding.source_location.first
assert_matching_line(ex, file, options)
end