/usr/bin/r2r_show is in ruby-ruby2ruby 1.3.1-1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/usr/bin/ruby1.8
require 'ruby2ruby'
require 'ruby_parser'
$h ||= false
$s ||= false
if $h then
puts "usage: #{File.basename $0} [options] [file...]"
puts "options:"
puts "-h : display usage"
puts "-s : print the sexp before displaying the translated ruby"
exit 1
end
ARGV.push "-" if ARGV.empty?
parser = RubyParser.new
ruby2ruby = Ruby2Ruby.new
ARGV.each do |file|
ruby = file == "-" ? $stdin.read : File.read(file)
sexp = parser.process(ruby, file)
p sexp if $s
puts ruby2ruby.process(sexp)
end
|