ruby-changes:40911
From: ko1 <ko1@a...>
Date: Wed, 9 Dec 2015 11:41:33 +0900 (JST)
Subject: [ruby-changes:40911] ko1:r52990 (trunk): add documentation for RubyVM::InstructionSequence#to_binary_format and RubyVM::InstructionSequence.from_binary_format
ko1 2015-12-09 11:41:14 +0900 (Wed, 09 Dec 2015) New Revision: 52990 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52990 Log: add documentation for RubyVM::InstructionSequence#to_binary_format and RubyVM::InstructionSequence.from_binary_format Modified files: trunk/iseq.c Index: iseq.c =================================================================== --- iseq.c (revision 52989) +++ iseq.c (revision 52990) @@ -2343,6 +2343,11 @@ rb_iseqw_local_variables(VALUE iseqval) https://github.com/ruby/ruby/blob/trunk/iseq.c#L2343 * String extra_data will be saved with binary data. * You can access this data with * RubyVM::InstructionSequence.from_binary_format_extra_data(binary). + * + * Note that the translated binary data is not portable. + * You can not move this binary data to another machine. + * You can not use the binary data whcih is created by another + * version/another architecture of Ruby. */ static VALUE iseqw_to_binary_format(int argc, VALUE *argv, VALUE self) @@ -2358,6 +2363,12 @@ iseqw_to_binary_format(int argc, VALUE * https://github.com/ruby/ruby/blob/trunk/iseq.c#L2363 * * Load an iseq object from binary format String object * created by RubyVM::InstructionSequence.to_binary_format. + * + * This loader does not have a verifier, so that loading broken/modified + * binary causes critical problem. + * + * You should not load binary data provided by others. + * You should use binary data translated by yourself. */ static VALUE iseqw_s_from_binary_format(VALUE self, VALUE str) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/