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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ require (
github.com/go-ruby-pagy/pagy v0.0.0-20260717071719-997d15eee011
github.com/go-ruby-paper-trail/paper-trail v0.0.0-20260717071745-42a249656e5a
github.com/go-ruby-parquet/parquet v0.0.0-20260923211642-bc75bcb9031e
github.com/go-ruby-parser/parser v0.11.0
github.com/go-ruby-parser/parser v0.11.1
github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f
github.com/go-ruby-pg/pg v0.0.0-20260916100523-3831ec811a67
github.com/go-ruby-prawn/prawn v0.0.0-20260927145511-370d5985305c
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ github.com/go-ruby-parser/parser v0.10.0 h1:uYxEAIL6V5K0bA5BrCzLgE2BFU8u4EkAEx22
github.com/go-ruby-parser/parser v0.10.0/go.mod h1:NRbX4dYcQ6CgcaSaMmu1dh95QuKGq+RdenUoWU73214=
github.com/go-ruby-parser/parser v0.11.0 h1:LKLRluN9Da9AkeBZ9Ta4+R9x33rVGUR7YhuVKZA2XHk=
github.com/go-ruby-parser/parser v0.11.0/go.mod h1:NRbX4dYcQ6CgcaSaMmu1dh95QuKGq+RdenUoWU73214=
github.com/go-ruby-parser/parser v0.11.1 h1:8gov5+nyKxY9NUTJI5sVvammrNOdJ32aylrASdjP2js=
github.com/go-ruby-parser/parser v0.11.1/go.mod h1:NRbX4dYcQ6CgcaSaMmu1dh95QuKGq+RdenUoWU73214=
github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f h1:9pt89wlAp12vbCNGFYmbSqp/PJTHRwUx1yNDXW5hWRI=
github.com/go-ruby-pathname/pathname v0.0.0-20260916100446-0824484b665f/go.mod h1:IvW5q5Kyl5l3hrYwiHylOEmk5hpGSo7XqcmUXBHF5H0=
github.com/go-ruby-pg/pg v0.0.0-20260916100523-3831ec811a67 h1:X9MKhEAV60oYoL94tqb11lfLw3yW097mVqfjDdy5PK0=
Expand Down
16 changes: 13 additions & 3 deletions internal/vm/prelude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1987,9 +1987,19 @@ def +(other)
Pathname.new(Pathname.__lex_plus(@path, other.to_s))
end

def /(other)
self + other
end
# `alias / +`, not a forwarding def. The difference is observable three ways:
# #original_name answers :+, instance_method(:/) == instance_method(:+), and a
# redefinition of #+ does NOT follow -- the alias keeps the body it was made
# from, as ruby does:
#
# class Pathname; def +(o); "HIJACKED"; end; end
# Pathname.new("/a") / "b" ruby #<Pathname:/a/b> forwarding def "HIJACKED"
#
# It was a forwarding def because the parser refused `alias / +`: after
# `alias`, a `/` opened a regexp. Fixed in go-ruby-parser v0.11.1, which this
# bumps to, and which CRuby's own pathname.rb line 358 needs for the same
# reason.
alias / +

def join(*args)
result = self
Expand Down
Loading
Loading