forked from rubinius/rubinius
/
rbx_bridge.rb
57 lines (46 loc) · 818 Bytes
/
rbx_bridge.rb
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module Rubinius
RUBY_LIB_VERSION = 18
def self.ruby18?
RUBY_VERSION =~ /^1\.8/
end
def self.ruby19?
RUBY_VERSION =~ /^1\.9/
end
def self.ruby20?
RUBY_VERSION =~ /^2\.0/
end
class Compiler
class Stage
end
class Writer
attr_accessor :version
end
end
class CompiledFile
def self.dump(cm, file, signature=0, version=0)
File.open(file, "wb") do |f|
new("!RBIX", signature, version).encode_to(f, cm)
end
end
end
class Generator
attr_accessor :post_args
end
class CompiledMethod
attr_accessor :post_args
end
module AST
class Node
end
class FormalArguments < Node
def post_args
0
end
end
class IterArguments < Node
def post_args
0
end
end
end
end