summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 15:10:57 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 15:10:57 (GMT)
commit4b8da4b9c8494635a4fcdf3a14ba1dc3fece6842 (patch)
tree33e7b36e2c3ad5c076966aee7d518e3c8ed6d3df /sample
parent98b75d59b9c904953e9fce61e43b16088a47e3c2 (diff)
* iseq.c: rename methods
RubyVM::InstructionSequence#to_binary_format -> #to_binary RubyVM::InstructionSequence.from_binary_format -> .load_from_binary RubyVM::InstructionSequence.from_binary_format_extra_data -> .load_from_binary_extra_data * iseq.c: fix document of iseq.to_binary. [Fix GH-1134] * sample/iseq_loader.rb: catch up this change. * test/lib/iseq_loader_checker.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/iseq_loader.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/sample/iseq_loader.rb b/sample/iseq_loader.rb
index 2fd9184..bb2d92e 100644
--- a/sample/iseq_loader.rb
+++ b/sample/iseq_loader.rb
@@ -70,9 +70,9 @@ class RubyVM::InstructionSequence
$ISEQ_LOADER_LOADED += 1
STDERR.puts "[ISEQ_LOADER] #{Process.pid} load #{fname} from #{iseq_key}" if COMPILE_DEBUG
binary = read_compiled_iseq(fname, iseq_key)
- iseq = RubyVM::InstructionSequence.from_binary_format(binary)
- # p [extra_data(iseq.path), RubyVM::InstructionSequence.from_binary_format_extra_data(binary)]
- # raise unless extra_data(iseq.path) == RubyVM::InstructionSequence.from_binary_format_extra_data(binary)
+ iseq = RubyVM::InstructionSequence.load_from_binary(binary)
+ # p [extra_data(iseq.path), RubyVM::InstructionSequence.load_from_binary_extra_data(binary)]
+ # raise unless extra_data(iseq.path) == RubyVM::InstructionSequence.load_from_binary_extra_data(binary)
iseq
elsif COMPILE_IF_NOT_COMPILED
compile_and_save_iseq(fname, iseq_key)
@@ -92,7 +92,7 @@ class RubyVM::InstructionSequence
STDERR.puts "[RUBY_COMPILED_FILE] compile #{fname}" if COMPILE_DEBUG
iseq = RubyVM::InstructionSequence.compile_file(fname)
- binary = iseq.to_binary_format(extra_data(fname))
+ binary = iseq.to_binary(extra_data(fname))
write_compiled_iseq(fname, iseq_key, binary)
iseq
end