summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 09:31:22 (GMT)
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 09:31:22 (GMT)
commit3f059374b880c0e14788ec6654ab9e113c2e7c01 (patch)
treedf00a5c9bc0a14c2199e71290ca2c57955cef15a /sample
parent6ef345ab22ef79d35dacb802412066070bdccd2c (diff)
sample/iseq_loader: use File.open instead of Kernel#open
This makes auditing for inadvertant command execution easier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/iseq_loader.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/iseq_loader.rb b/sample/iseq_loader.rb
index bf6e422..8c27140 100644
--- a/sample/iseq_loader.rb
+++ b/sample/iseq_loader.rb
@@ -141,11 +141,11 @@ class RubyVM::InstructionSequence
end
def read_compiled_iseq fname, iseq_key
- open(iseq_key, 'rb'){|f| f.read}
+ File.open(iseq_key, 'rb'){|f| f.read}
end
def write_compiled_iseq fname, iseq_key, binary
- open(iseq_key, 'wb'){|f| f.write(binary)}
+ File.open(iseq_key, 'wb'){|f| f.write(binary)}
end
end