1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Expand paths used for dumper.rb

This seems to be needed on Samuel's environment
This commit is contained in:
Takashi Kokubun 2022-09-22 21:07:00 +09:00
parent 9434a7333c
commit 69130e1614
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -28,8 +28,8 @@ class RubyVM::Dumper
path = Pathname.new(__FILE__)
path = (path.relative_path_from(Pathname.pwd) rescue path).dirname
path += '../views'
path += Pathname.pwd.join(spec).to_s.sub("#{@base}/", '')
src = path.read mode: 'rt:utf-8:utf-8'
path += Pathname.pwd.join(spec).expand_path.to_s.sub("#{@base}/", '')
src = path.expand_path.read mode: 'rt:utf-8:utf-8'
rescue Errno::ENOENT
raise "don't know how to generate #{path}"
else