aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 02:41:14 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-09 02:41:14 +0000
commiteef8beb695477bdadbf25a87adf973143c366156 (patch)
treed3bca2aa0115500def73903d9f21c8f7ecee5a71 /iseq.c
parenta422462a18b775382d9bd265c7e83219ff1d6f04 (diff)
downloadruby-eef8beb695477bdadbf25a87adf973143c366156.tar.gz
add documentation for RubyVM::InstructionSequence#to_binary_format and RubyVM::InstructionSequence.from_binary_format
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/iseq.c b/iseq.c
index 6376934b4e..e6f4fdd8d5 100644
--- a/iseq.c
+++ b/iseq.c
@@ -2343,6 +2343,11 @@ rb_iseqw_local_variables(VALUE iseqval)
* 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 *argv, VALUE self)
*
* 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)