Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions lib/pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,12 @@
# For documentation, see class Pathname.
#

if defined?(::Pathname) # Clear builtin Pathname
# :stopdoc:
class ::Object
remove_const :Pathname
end

# Remove module_function Pathname
class << ::Kernel
undef Pathname
end
module ::Kernel
undef Pathname
end
unless RUBY_VERSION >= '4'
require 'pathname.so' if RUBY_ENGINE == 'ruby'

$".delete('pathname.so')
# :startdoc:
require_relative 'pathname_builtin'
end

require 'pathname.so' if RUBY_ENGINE == 'ruby'

require_relative 'pathname_builtin'

class Pathname # * Find *
#
# Iterates over the directory tree in a depth first manner, yielding a
Expand Down
1 change: 1 addition & 0 deletions test/pathname/test_ractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def setup
end

def test_ractor_shareable
omit "Ractor with Pathname is not supported on mingw" if /mingw/ =~ RUBY_PLATFORM
assert_separately([], "#{<<~"begin;"}\n#{<<~'end;'}")
class Ractor
alias value take
Expand Down