Skip to content

Commit 30a1140

Browse files
committed
Load 'power_assert/context' at first in order to raise SyntaxError before defining ::PowerAssert
It is a hack for test-unit. https://github.com/test-unit/test-unit/blob/f480a04ea0eb2be11f878051f280fc1de498afef/lib/test/unit/util/backtracefilter.rb#L15
1 parent 749bc8b commit 30a1140

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/power_assert.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
raise LoadError, 'Fully compatible TracePoint API required'
1818
end
1919

20-
require 'power_assert/version'
21-
require 'power_assert/configuration'
2220
require 'power_assert/context'
21+
require 'power_assert/configuration'
22+
require 'power_assert/version'
2323

2424
module PowerAssert
2525
POWER_ASSERT_LIB_DIR = File.dirname(caller_locations(1, 1).first.path)

0 commit comments

Comments
 (0)