Project

ruam

0.0
No commit activity in last 3 years
No release in over 3 years
Command line tool to show byte code of Ruby script
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0
~> 0.48
 Project Readme

Ruam

Gem Version Build Status

Ruam is a simple command line tool to inspect a byte code of Ruby script.

Installation

Add this line to your application's Gemfile:

gem 'ruam'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruam

Usage

$ cat hello.rb
puts 'hello world'

$ ruam hello.rb
== disasm: #<ISeq:<main>@hello.rb>======================================
0000 trace            1                                               (   1)
0002 putself          
0003 putstring        "hello world"
0005 opt_send_without_block <callinfo!mid:puts, argc:1, FCALL|ARGS_SIMPLE>, <callcache>
0008 leave            

If file name is not given, ruam read from stdin:

$ echo "puts 'hello world'" | ruam
== disasm: #<ISeq:<compiled>@<compiled>>================================
0000 trace            1                                               (   1)
0002 putself          
0003 putstring        "hello world"
0005 opt_send_without_block <callinfo!mid:puts, argc:1, FCALL|ARGS_SIMPLE>, <callcache>
0008 leave            

You can enable/disable compile option which are defined in the VM:

$ ruam hello.rb --no-trace-instruction
== disasm: #<ISeq:<main>@hello.rb>======================================
0000 putself                                                          (   1)
0001 putstring        "hello world"
0003 opt_send_without_block <callinfo!mid:puts, argc:1, FCALL|ARGS_SIMPLE>, <callcache>
0006 leave            

For more info, execute ruam -h.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ruam.

Lisence

Apache License 2.0

Author

@AuToPP