summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-13 12:10:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-13 12:10:10 +0900
commit751ffb276f658518c6fe06461a9d3d1c136c7d5d (patch)
tree894c78531c4fe3b609e81c1f8d87b1d8933019df /tool
parentdd5118f8524c425894d4716b787837ad7380bb0d (diff)
FreeBSD make uses the target under srcdir [ci skip]
Diffstat (limited to 'tool')
-rwxr-xr-x[-rw-r--r--]tool/ruby_vm/helpers/dumper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb
index c083dffa7a..150a81f04b 100644..100755
--- a/tool/ruby_vm/helpers/dumper.rb
+++ b/tool/ruby_vm/helpers/dumper.rb
@@ -28,7 +28,7 @@ class RubyVM::Dumper
path = Pathname.new(__FILE__)
path = (path.relative_path_from(Pathname.pwd) rescue path).dirname
path += '../views'
- path += Pathname.pwd.join(spec).expand_path.to_s.sub("#{@base}/", '')
+ path += Pathname.pwd.join(File.basename(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}"