Provide pathname.so with embedded Pathname

This commit is contained in:
Hiroshi SHIBATA 2025-07-15 11:29:46 +09:00
parent 8794406583
commit 69d4c67347
2 changed files with 7 additions and 0 deletions

View file

@ -1591,6 +1591,8 @@ Init_pathname(void)
rb_define_method(rb_cPathname, "delete", path_unlink, 0);
rb_undef_method(rb_cPathname, "=~");
rb_define_global_function("Pathname", path_f_pathname, 1);
rb_provide("pathname.so");
}
void

View file

@ -19,6 +19,7 @@ describe "Kernel#require" do
provided = %w[complex enumerator fiber rational thread ruby2_keywords]
ruby_version_is "3.5" do
provided << "set"
provided << "pathname"
end
it "#{provided.join(', ')} are already required" do
@ -31,6 +32,10 @@ describe "Kernel#require" do
features.sort.should == provided.sort
ruby_version_is "3.5" do
provided.map! { |f| f == "pathname" ? "pathname.so" : f }
end
code = provided.map { |f| "puts require #{f.inspect}\n" }.join
required = ruby_exe(code, options: '--disable-gems')
required.should == "false\n" * provided.size