ruby2ruby 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === 1.2.1 / 2008-11-04
2
+
3
+ * 1 bug fix:
4
+
5
+ * Don't freak out and die if passed a c function defn. stupid rails.
6
+
1
7
  === 1.2.0 / 2008-10-22
2
8
 
3
9
  * 2 minor enhancements:
@@ -5,7 +5,7 @@ require 'sexp_processor'
5
5
  require 'unified_ruby'
6
6
 
7
7
  class Ruby2Ruby < SexpProcessor
8
- VERSION = '1.2.0'
8
+ VERSION = '1.2.1'
9
9
  LINE_LENGTH = 78
10
10
 
11
11
  ##
@@ -28,7 +28,15 @@ class Ruby2Ruby < SexpProcessor
28
28
  def self.translate(klass_or_str, method = nil)
29
29
  require 'parse_tree'
30
30
  sexp = ParseTree.translate(klass_or_str, method)
31
- sexp = Unifier.new.process(sexp)
31
+
32
+ unifier = Unifier.new
33
+
34
+ unifier.processors.each do |p|
35
+ p.unsupported.delete :cfunc # HACK
36
+ end
37
+
38
+ sexp = unifier.process(sexp)
39
+
32
40
  self.new.process(sexp)
33
41
  end
34
42
 
@@ -912,8 +920,8 @@ class Ruby2Ruby < SexpProcessor
912
920
 
913
921
  body = []
914
922
  begin
915
- code = process(exp.shift).chomp
916
- body << code unless code.nil? or code.empty?
923
+ code = process(exp.shift)
924
+ body << code.chomp unless code.nil? or code.chomp.empty?
917
925
  end until exp.empty?
918
926
 
919
927
  unless body.empty? then
@@ -4,7 +4,7 @@ $TESTING = true
4
4
 
5
5
  $: << 'lib'
6
6
 
7
- SKIP_PROCS = RUBY_VERSION >= "1.9" or defined? RUBY_ENGINE
7
+ SKIP_PROCS = ENV['FAST'] or RUBY_VERSION >= "1.9" or defined? RUBY_ENGINE
8
8
 
9
9
  require 'test/unit'
10
10
  require 'ruby2ruby'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-22 00:00:00 -05:00
12
+ date: 2008-11-04 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements: []
76
76
 
77
77
  rubyforge_project: seattlerb
78
- rubygems_version: 1.3.0
78
+ rubygems_version: 1.3.1
79
79
  signing_key:
80
80
  specification_version: 2
81
81
  summary: ruby2ruby provides a means of generating pure ruby code easily from ParseTree's Sexps