lib/ruby2ruby.rb in ruby2ruby-1.2.2 vs lib/ruby2ruby.rb in ruby2ruby-1.2.3
- old
+ new
@@ -1,13 +1,12 @@
#!/usr/bin/env ruby -w
-begin require 'rubygems'; rescue LoadError; end
+require 'rubygems'
require 'sexp_processor'
-require 'unified_ruby'
class Ruby2Ruby < SexpProcessor
- VERSION = '1.2.2'
+ VERSION = '1.2.3'
LINE_LENGTH = 78
##
# Nodes that represent assignment and probably need () around them.
@@ -22,24 +21,9 @@
:op_asgn2,
:op_asgn_and,
:op_asgn_or,
:return,
]
-
- def self.translate(klass_or_str, method = nil)
- require 'parse_tree'
- sexp = ParseTree.translate(klass_or_str, method)
-
- unifier = Unifier.new
-
- unifier.processors.each do |p|
- p.unsupported.delete :cfunc # HACK
- end
-
- sexp = unifier.process(sexp)
-
- self.new.process(sexp)
- end
def initialize
super
@indent = " "
self.auto_shift_type = true