ruby2cext 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,73 @@
1
+ def a; end
2
+ public
3
+ def b; end
4
+ private
5
+ def c; end
6
+ protected rescue puts("failed OK")
7
+ def d; end
8
+ module_function rescue puts("failed OK")
9
+ def e; end
10
+
11
+ module A
12
+ def a; end
13
+ public
14
+ def b; end
15
+ private
16
+ def c; end
17
+ protected
18
+ def d; end
19
+ module_function
20
+ def e; end
21
+ end
22
+
23
+ class B
24
+ def a; end
25
+ public
26
+ def b; end
27
+ private
28
+ def c; end
29
+ protected
30
+ def d; end
31
+ module_function rescue puts("failed OK")
32
+ def e; end
33
+ end
34
+
35
+ class << "xxx"
36
+ def a; end
37
+ public
38
+ def b; end
39
+ private
40
+ def c; end
41
+ protected
42
+ def d; end
43
+ module_function rescue puts("failed OK")
44
+ def e; end
45
+ end
46
+
47
+ class C
48
+ def foo
49
+ def a; end
50
+ public rescue puts("failed OK")
51
+ def b; end
52
+ private rescue puts("failed OK")
53
+ def c; end
54
+ protected rescue puts("failed OK")
55
+ def d; end
56
+ module_function rescue puts("failed OK")
57
+ def e; end
58
+ end
59
+ end
60
+
61
+ C.new.foo
62
+
63
+ Module.new.class_eval {
64
+ def a; end
65
+ public
66
+ def b; end
67
+ private
68
+ def c; end
69
+ protected
70
+ def d; end
71
+ module_function
72
+ def e; end
73
+ }
@@ -0,0 +1,35 @@
1
+ eval("1")
2
+ method(:eval).arity
3
+ class A
4
+ define_method(:evxx, method(:eval))
5
+ attr :a1
6
+ attr_reader :a2, :a3
7
+ attr_writer :a4, :a5
8
+ attr_accessor :a7
9
+ end
10
+ def foo
11
+ local_variables +
12
+ [binding]
13
+ end
14
+
15
+ class A
16
+ p=proc{}
17
+ instance_eval(&p)
18
+ module_eval(&p)
19
+ class_eval(&p)
20
+ define_method(:xx, &p)
21
+ instance_eval("1")
22
+ module_eval("1")
23
+ class_eval("1")
24
+ define_method(:yy) {}
25
+ end
26
+
27
+ callcc(&proc{})
28
+ callcc { |cc| cc }
29
+
30
+ # no warnings below
31
+ class A
32
+ instance_eval { 1 }
33
+ module_eval { 1 }
34
+ class_eval { 1 }
35
+ end
metadata ADDED
@@ -0,0 +1,87 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
4
+ name: ruby2cext
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.2.0
7
+ date: 2007-06-13 00:00:00 +02:00
8
+ summary: Ruby2CExtension is a Ruby to C extension translator/compiler.
9
+ require_paths:
10
+ - lib
11
+ email: dbatml@gmx.de
12
+ homepage: http://ruby2cext.rubyforge.org/
13
+ rubyforge_project:
14
+ description:
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: 1.8.4
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Dominik Bathon
31
+ files:
32
+ - bin/rb2cx
33
+ - lib/ruby2cext
34
+ - lib/ruby2cext/parser.rb
35
+ - lib/ruby2cext/error.rb
36
+ - lib/ruby2cext/compiler.rb
37
+ - lib/ruby2cext/c_function.rb
38
+ - lib/ruby2cext/scopes.rb
39
+ - lib/ruby2cext/str_to_c_strlit.rb
40
+ - lib/ruby2cext/common_node_comp.rb
41
+ - lib/ruby2cext/tools.rb
42
+ - lib/ruby2cext/eval2c.rb
43
+ - lib/ruby2cext/plugins
44
+ - lib/ruby2cext/plugins/warnings.rb
45
+ - lib/ruby2cext/plugins/builtin_methods.rb
46
+ - lib/ruby2cext/plugins/case_optimize.rb
47
+ - lib/ruby2cext/plugins/const_cache.rb
48
+ - lib/ruby2cext/plugins/require_include.rb
49
+ - lib/ruby2cext/plugins/inline_methods.rb
50
+ - lib/ruby2cext/version.rb
51
+ - lib/ruby2cext/plugin.rb
52
+ - testfiles/test.rb
53
+ - testfiles/bench.rb
54
+ - testfiles/eval2c
55
+ - testfiles/eval2c/test_eval2c.rb
56
+ - testfiles/vmode_test.rb
57
+ - testfiles/warn_test.rb
58
+ - doc/eval2c.html
59
+ - doc/optimizations.html
60
+ - doc/limitations.html
61
+ - doc/index.html
62
+ - doc/rb2cx.html
63
+ - doc/style.css
64
+ - README
65
+ - Changelog
66
+ test_files: []
67
+
68
+ rdoc_options: []
69
+
70
+ extra_rdoc_files: []
71
+
72
+ executables:
73
+ - rb2cx
74
+ extensions: []
75
+
76
+ requirements: []
77
+
78
+ dependencies:
79
+ - !ruby/object:Gem::Dependency
80
+ name: rubynode
81
+ version_requirement:
82
+ version_requirements: !ruby/object:Gem::Version::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 0.1.1
87
+ version: