mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Provide pathname.so with embedded Pathname
This commit is contained in:
parent
8794406583
commit
69d4c67347
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue