зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
6ef345ab22
Коммит
3f059374b8
|
@ -141,11 +141,11 @@ class RubyVM::InstructionSequence
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_compiled_iseq fname, iseq_key
|
def read_compiled_iseq fname, iseq_key
|
||||||
open(iseq_key, 'rb'){|f| f.read}
|
File.open(iseq_key, 'rb'){|f| f.read}
|
||||||
end
|
end
|
||||||
|
|
||||||
def write_compiled_iseq fname, iseq_key, binary
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче