diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-18 23:58:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-18 23:58:21 +0000 |
commit | 3c83a94ea980dcec7a8dc7aec5f40f4e2a588e71 (patch) | |
tree | 4f24773ad1373765b483973362cc13bd6cc8ecf8 /tool/ruby_vm/helpers | |
parent | 88a7271de4e6a8b32bbbaa83eca84bf71c888f65 (diff) |
tool/insns2vm.rb: get rid of expanding paths
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/ruby_vm/helpers')
-rw-r--r-- | tool/ruby_vm/helpers/dumper.rb | 6 | ||||
-rw-r--r-- | tool/ruby_vm/helpers/scanner.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tool/ruby_vm/helpers/dumper.rb b/tool/ruby_vm/helpers/dumper.rb index ccd5717cc8..ae2a0145cf 100644 --- a/tool/ruby_vm/helpers/dumper.rb +++ b/tool/ruby_vm/helpers/dumper.rb @@ -25,7 +25,7 @@ class RubyVM::Dumper end def new_erb spec - path = Pathname.new(__FILE__).realpath.dirname + path = Pathname.new(__FILE__).relative_path_from(Pathname.pwd).dirname path += '../views' path += spec src = path.read mode: 'rt:utf-8:utf-8' @@ -37,7 +37,7 @@ class RubyVM::Dumper else erb = ERB.new(src, nil, '%-') end - erb.filename = path.realpath.to_path + erb.filename = path.to_path return erb end @@ -87,7 +87,7 @@ class RubyVM::Dumper def initialize dst @erb = {} @empty = new_binding - @file = cstr dst.realdirpath.to_path + @file = cstr dst.to_path end def render partial, opts = { :locals => {} } diff --git a/tool/ruby_vm/helpers/scanner.rb b/tool/ruby_vm/helpers/scanner.rb index 2ae5ad66b1..410b02eff5 100644 --- a/tool/ruby_vm/helpers/scanner.rb +++ b/tool/ruby_vm/helpers/scanner.rb @@ -20,10 +20,10 @@ class RubyVM::Scanner attr_reader :__LINE__ def initialize path - src = Pathname.new(__FILE__).realpath.dirname + src = Pathname.new(__FILE__).relative_path_from(Pathname.pwd).dirname src += path @__LINE__ = 1 - @__FILE__ = src.realpath.to_path + @__FILE__ = src.to_path @str = src.read mode: 'rt:utf-8:utf-8' @pos = 0 end |