Skip to content

Commit fc00a4d

Browse files
hsbtclaude
andcommitted
Fix require spec for pathname builtin
Remove redundant rb_provide("pathname") since pathname.so and pathname.rb already cover all require patterns. Add uniq! to the require spec to handle pathname appearing twice in $LOADED_FEATURES (once for .so, once for .rb). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d4cda34 commit fc00a4d

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

pathname.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ InitVM_pathname(void)
121121

122122
rb_provide("pathname.so");
123123
rb_provide("pathname.rb");
124-
rb_provide("pathname");
125124
}
126125

127126
void

spec/ruby/core/kernel/require_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
features -= %w[encdb transdb windows_1252 windows_31]
3737
end
3838
features.reject! { |feature| feature.end_with?('-fake') }
39+
features.uniq!
3940

4041
features.sort.should == provided.sort
4142

0 commit comments

Comments
 (0)