repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git]
/
tool
/
parse.rb
blob
6243d7aa8ecf58c75c02620737fb5cdcf9fdc6c5
1
$file = ARGV[0]
2
$str = ARGF.read.sub(/^__END__.*\z/m, '')
3
puts '# ' + '-' * 70
4
puts "# target program: "
5
puts '# ' + '-' * 70
6
puts $str
7
puts '# ' + '-' * 70
8
9
$parsed = RubyVM::InstructionSequence.compile_file($file)
10
puts "# disasm result: "
11
puts '# ' + '-' * 70
12
puts $parsed.disasm
13
puts '# ' + '-' * 70