aboutsummaryrefslogtreecommitdiffstats
path: root/sample
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 09:31:22 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-12 09:31:22 +0000
commit33a1a559a130fe7e01d0d130345390519bec37a9 (patch)
treedf00a5c9bc0a14c2199e71290ca2c57955cef15a /sample
parentd1bc463c6e80ce3cab6deacde0cf2ba6996cfc62 (diff)
downloadruby-33a1a559a130fe7e01d0d130345390519bec37a9.tar.gz
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 bf6e422d29..8c271405d6 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