diff options
author | Satoshi Tagomori <[email protected]> | 2025-04-30 13:48:02 +0900 |
---|---|---|
committer | Satoshi Tagomori <[email protected]> | 2025-05-11 23:32:50 +0900 |
commit | 382645d440d5da66a0c04557f3ff2ca226de3a27 () | |
tree | b7453449930197237e739d0985561b664f51b0f3 /test | |
parent | 49742414f6444960838bb968bab43db27f5872c1 (diff) |
namespace on read
33 files changed, 1222 insertions, 4 deletions
@@ -0,0 +1,97 @@ @@ -9,7 +9,11 @@ class TestABI < Test::Unit::TestCase assert_separately [], <<~RUBY err = assert_raise(LoadError) { require "-test-/abi" } assert_match(/incompatible ABI version/, err.message) - assert_include err.message, "/-test-/abi." RUBY end @@ -27,7 +31,11 @@ class TestABI < Test::Unit::TestCase assert_separately [{ "RUBY_ABI_CHECK" => "1" }], <<~RUBY err = assert_raise(LoadError) { require "-test-/abi" } assert_match(/incompatible ABI version/, err.message) - assert_include err.message, "/-test-/abi." RUBY end @@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@ @@ -0,0 +1,15 @@ @@ -0,0 +1,8 @@ @@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@ @@ -0,0 +1,5 @@ @@ -0,0 +1,8 @@ @@ -0,0 +1,147 @@ @@ -0,0 +1,13 @@ @@ -0,0 +1,5 @@ @@ -0,0 +1,37 @@ @@ -0,0 +1,9 @@ @@ -0,0 +1,26 @@ @@ -0,0 +1,10 @@ @@ -0,0 +1,31 @@ @@ -0,0 +1,14 @@ @@ -0,0 +1,5 @@ @@ -0,0 +1,64 @@ @@ -0,0 +1,3 @@ @@ -0,0 +1,12 @@ @@ -0,0 +1,65 @@ @@ -0,0 +1,13 @@ @@ -0,0 +1,5 @@ @@ -0,0 +1 @@ @@ -0,0 +1,12 @@ @@ -0,0 +1,33 @@ @@ -224,11 +224,18 @@ p Foo::Bar Kernel.module_eval do alias old_require require end called_with = [] Kernel.send :define_method, :require do |path| called_with << path old_require path end yield called_with ensure Kernel.module_eval do @@ -236,6 +243,11 @@ p Foo::Bar alias require old_require undef old_require end end def test_require_implemented_in_ruby_is_called @@ -249,7 +261,8 @@ p Foo::Bar ensure remove_autoload_constant end - assert_equal [file.path], called_with } end end @@ -267,7 +280,8 @@ p Foo::Bar ensure remove_autoload_constant end - assert_equal [a.path, b.path], called_with end end end @@ -0,0 +1,516 @@ @@ -260,6 +260,8 @@ class TestRubyOptions < Test::Unit::TestCase end def test_parser_flag assert_in_out_err(%w(--parser=prism -e) + ["puts :hi"], "", %w(hi), []) assert_in_out_err(%w(--parser=prism --dump=parsetree -e _=:hi), "", /"hi"/, []) |