rsense-core 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +1 -0
- data/README.md +35 -0
- data/Rakefile +84 -0
- data/TypeAnnotation.tokens +41 -0
- data/build.xml +84 -0
- data/build_lib/antlr-3.2.jar +0 -0
- data/lib/jars/ant-1.7.0.jar +0 -0
- data/lib/jars/ant-launcher-1.7.0.jar +0 -0
- data/lib/jars/antlr-runtime-3.2.jar +0 -0
- data/lib/jars/bsf-2.3.0.jar +0 -0
- data/lib/rsense-core.rb +28 -0
- data/lib/rsense.jar +0 -0
- data/lib/rsense/core.rb +5 -0
- data/lib/rsense/core/version.rb +5 -0
- data/lib/rsense/parser.rb +6 -0
- data/lib/rsense/ruby.rb +19 -0
- data/lib/rsense/typing.rb +13 -0
- data/lib/rsense/typing/annotation.rb +20 -0
- data/lib/rsense/typing/runtime.rb +23 -0
- data/lib/rsense/typing/vertex.rb +15 -0
- data/lib/rsense/util.rb +9 -0
- data/rsense-core.gemspec +30 -0
- data/src/org/cx4a/rsense/CodeAssist.java +744 -0
- data/src/org/cx4a/rsense/CodeAssistError.java +31 -0
- data/src/org/cx4a/rsense/CodeAssistResult.java +42 -0
- data/src/org/cx4a/rsense/CodeCompletionResult.java +65 -0
- data/src/org/cx4a/rsense/FindDefinitionResult.java +24 -0
- data/src/org/cx4a/rsense/LoadResult.java +19 -0
- data/src/org/cx4a/rsense/Main.java +916 -0
- data/src/org/cx4a/rsense/Options.java +353 -0
- data/src/org/cx4a/rsense/Project.java +103 -0
- data/src/org/cx4a/rsense/TypeInferenceResult.java +25 -0
- data/src/org/cx4a/rsense/WhereResult.java +19 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotation.g +221 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotationLexer.java +1759 -0
- data/src/org/cx4a/rsense/parser/TypeAnnotationParser.java +2025 -0
- data/src/org/cx4a/rsense/ruby/Block.java +10 -0
- data/src/org/cx4a/rsense/ruby/Context.java +75 -0
- data/src/org/cx4a/rsense/ruby/DynamicMethod.java +10 -0
- data/src/org/cx4a/rsense/ruby/DynamicScope.java +51 -0
- data/src/org/cx4a/rsense/ruby/Frame.java +95 -0
- data/src/org/cx4a/rsense/ruby/IRubyObject.java +17 -0
- data/src/org/cx4a/rsense/ruby/LocalScope.java +43 -0
- data/src/org/cx4a/rsense/ruby/MetaClass.java +50 -0
- data/src/org/cx4a/rsense/ruby/Ruby.java +242 -0
- data/src/org/cx4a/rsense/ruby/RubyClass.java +146 -0
- data/src/org/cx4a/rsense/ruby/RubyModule.java +255 -0
- data/src/org/cx4a/rsense/ruby/RubyObject.java +94 -0
- data/src/org/cx4a/rsense/ruby/Scope.java +7 -0
- data/src/org/cx4a/rsense/ruby/SpecialObject.java +15 -0
- data/src/org/cx4a/rsense/ruby/Visibility.java +17 -0
- data/src/org/cx4a/rsense/typing/Graph.java +1690 -0
- data/src/org/cx4a/rsense/typing/Propagation.java +73 -0
- data/src/org/cx4a/rsense/typing/Template.java +84 -0
- data/src/org/cx4a/rsense/typing/TemplateAttribute.java +158 -0
- data/src/org/cx4a/rsense/typing/TypeSet.java +48 -0
- data/src/org/cx4a/rsense/typing/annotation/ClassType.java +57 -0
- data/src/org/cx4a/rsense/typing/annotation/MethodType.java +79 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeAnnotation.java +4 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeAny.java +7 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeApplication.java +37 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeConstraint.java +29 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeExpression.java +11 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeIdentity.java +59 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeOptional.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypePragma.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeSplat.java +22 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeTuple.java +35 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeUnion.java +23 -0
- data/src/org/cx4a/rsense/typing/annotation/TypeVariable.java +44 -0
- data/src/org/cx4a/rsense/typing/runtime/AliasMethod.java +94 -0
- data/src/org/cx4a/rsense/typing/runtime/AnnotationHelper.java +69 -0
- data/src/org/cx4a/rsense/typing/runtime/AnnotationResolver.java +523 -0
- data/src/org/cx4a/rsense/typing/runtime/Array.java +84 -0
- data/src/org/cx4a/rsense/typing/runtime/ClassTag.java +27 -0
- data/src/org/cx4a/rsense/typing/runtime/DefaultMethod.java +115 -0
- data/src/org/cx4a/rsense/typing/runtime/Hash.java +131 -0
- data/src/org/cx4a/rsense/typing/runtime/LoopTag.java +21 -0
- data/src/org/cx4a/rsense/typing/runtime/Method.java +32 -0
- data/src/org/cx4a/rsense/typing/runtime/MonomorphicObject.java +77 -0
- data/src/org/cx4a/rsense/typing/runtime/ObjectAllocator.java +40 -0
- data/src/org/cx4a/rsense/typing/runtime/PolymorphicObject.java +90 -0
- data/src/org/cx4a/rsense/typing/runtime/Proc.java +100 -0
- data/src/org/cx4a/rsense/typing/runtime/RuntimeHelper.java +1339 -0
- data/src/org/cx4a/rsense/typing/runtime/SpecialMethod.java +119 -0
- data/src/org/cx4a/rsense/typing/runtime/TypeVarMap.java +112 -0
- data/src/org/cx4a/rsense/typing/runtime/VertexHolder.java +48 -0
- data/src/org/cx4a/rsense/typing/vertex/CallVertex.java +122 -0
- data/src/org/cx4a/rsense/typing/vertex/MultipleAsgnVertex.java +23 -0
- data/src/org/cx4a/rsense/typing/vertex/PassThroughVertex.java +20 -0
- data/src/org/cx4a/rsense/typing/vertex/SValueVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/SplatVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/ToAryVertex.java +24 -0
- data/src/org/cx4a/rsense/typing/vertex/TypeVarVertex.java +22 -0
- data/src/org/cx4a/rsense/typing/vertex/Vertex.java +221 -0
- data/src/org/cx4a/rsense/typing/vertex/YieldVertex.java +70 -0
- data/src/org/cx4a/rsense/util/HereDocReader.java +48 -0
- data/src/org/cx4a/rsense/util/Logger.java +111 -0
- data/src/org/cx4a/rsense/util/NodeUtil.java +198 -0
- data/src/org/cx4a/rsense/util/SourceLocation.java +70 -0
- data/src/org/cx4a/rsense/util/StringUtil.java +63 -0
- data/src/resources/org/cx4a/rsense/rsense.properties +1 -0
- data/stubs/1.8/_builtin.rb +3006 -0
- data/stubs/1.8/bigdecimal.rb +131 -0
- data/stubs/1.8/cgi.rb +257 -0
- data/stubs/1.8/date.rb +147 -0
- data/stubs/1.8/optparse.rb +113 -0
- data/stubs/1.8/rational.rb +47 -0
- data/stubs/1.8/set.rb +94 -0
- data/stubs/1.8/socket.rb +461 -0
- data/stubs/1.8/stringio.rb +129 -0
- data/test/data/a file.rb +1 -0
- data/test/data/benchmark.rb +12 -0
- data/test/data/crlf.rb +5 -0
- data/test/data/test.rb +19 -0
- data/test/script/all.rsense +2 -0
- data/test/script/array_dynamic.rsense +25 -0
- data/test/script/block_nested.rsense +7 -0
- data/test/script/builtin.rsense +785 -0
- data/test/script/class_method_partial_update.rsense +52 -0
- data/test/script/class_partial_update.rsense +17 -0
- data/test/script/find-definition.rsense +72 -0
- data/test/script/method_arg_onearg.rsense +6 -0
- data/test/script/method_arg_optional.rsense +7 -0
- data/test/script/method_partial_update.rsense +14 -0
- data/test/script/method_yield_arrayarg.rsense +8 -0
- data/test/script/method_yield_arrayarg_expand.rsense +8 -0
- data/test/script/method_yield_arrayarg_splat.rsense +17 -0
- data/test/script/misc.rsense +2 -0
- data/test/script/proc_higher_order.rsense +22 -0
- data/test/script/regression.rsense +95 -0
- data/test/script/stdlib.rsense +66 -0
- data/test/script/where.rsense +41 -0
- metadata +315 -0
@@ -0,0 +1,198 @@
|
|
1
|
+
package org.cx4a.rsense.util;
|
2
|
+
|
3
|
+
import org.jrubyparser.NodeVisitor;
|
4
|
+
import org.jrubyparser.ast.*;
|
5
|
+
|
6
|
+
|
7
|
+
public class NodeUtil {
|
8
|
+
|
9
|
+
private NodeUtil() {}
|
10
|
+
|
11
|
+
public static int nodeHashCode(Node node) {
|
12
|
+
if (node == null) return 0;
|
13
|
+
return new NodeHashCodeCalculator(node).getHashCode();
|
14
|
+
}
|
15
|
+
|
16
|
+
private static class NodeHashCodeCalculator implements NodeVisitor {
|
17
|
+
private int hashCode;
|
18
|
+
|
19
|
+
public NodeHashCodeCalculator(Node node) {
|
20
|
+
hashCode = 0;
|
21
|
+
node.accept(this);
|
22
|
+
}
|
23
|
+
|
24
|
+
public int getHashCode() {
|
25
|
+
return hashCode;
|
26
|
+
}
|
27
|
+
|
28
|
+
public Object visitAliasNode(AliasNode node) { return update(0); }
|
29
|
+
public Object visitAndNode(AndNode node) { return update(1); }
|
30
|
+
public Object visitArgsNode(ArgsNode node) { return update(2); }
|
31
|
+
public Object visitArgsCatNode(ArgsCatNode node) { return update(3); }
|
32
|
+
public Object visitArgsPushNode(ArgsPushNode node) { return update(4); }
|
33
|
+
public Object visitArrayNode(ArrayNode node) { return update(5); }
|
34
|
+
public Object visitAttrAssignNode(AttrAssignNode node) { return update(6); }
|
35
|
+
public Object visitBackRefNode(BackRefNode node) { return update(7); }
|
36
|
+
public Object visitBeginNode(BeginNode node) { return update(8); }
|
37
|
+
public Object visitBignumNode(BignumNode node) { return update(9); }
|
38
|
+
public Object visitBlockArgNode(BlockArgNode node) { return update(10); }
|
39
|
+
public Object visitBlockNode(BlockNode node) { return update(11); }
|
40
|
+
public Object visitBlockPassNode(BlockPassNode node) { return update(12); }
|
41
|
+
public Object visitBreakNode(BreakNode node) { return update(13); }
|
42
|
+
public Object visitConstDeclNode(ConstDeclNode node) { return update(14); }
|
43
|
+
public Object visitClassVarAsgnNode(ClassVarAsgnNode node) { return update(15); }
|
44
|
+
public Object visitClassVarDeclNode(ClassVarDeclNode node) { return update(16); }
|
45
|
+
public Object visitClassVarNode(ClassVarNode node) { return update(17); }
|
46
|
+
public Object visitCallNode(CallNode node) { return update(18); }
|
47
|
+
public Object visitCaseNode(CaseNode node) { return update(19); }
|
48
|
+
public Object visitClassNode(ClassNode node) { return update(20); }
|
49
|
+
public Object visitColon2Node(Colon2Node node) { return update(21); }
|
50
|
+
public Object visitColon3Node(Colon3Node node) { return update(22); }
|
51
|
+
public Object visitConstNode(ConstNode node) { return update(23); }
|
52
|
+
public Object visitDAsgnNode(DAsgnNode node) { return update(24); }
|
53
|
+
public Object visitDRegxNode(DRegexpNode node) { return update(25); }
|
54
|
+
public Object visitDStrNode(DStrNode node) { return update(26); }
|
55
|
+
public Object visitDSymbolNode(DSymbolNode node) { return update(27); }
|
56
|
+
public Object visitDVarNode(DVarNode node) { return update(28); }
|
57
|
+
public Object visitDXStrNode(DXStrNode node) { return update(29); }
|
58
|
+
public Object visitDefinedNode(DefinedNode node) { return update(30); }
|
59
|
+
public Object visitDefnNode(DefnNode node) { return update(31); }
|
60
|
+
public Object visitDefsNode(DefsNode node) { return update(32); }
|
61
|
+
public Object visitDotNode(DotNode node) { return update(33); }
|
62
|
+
public Object visitEncodingNode(EncodingNode node) { return update(34); }
|
63
|
+
public Object visitEnsureNode(EnsureNode node) { return update(35); }
|
64
|
+
public Object visitEvStrNode(EvStrNode node) { return update(36); }
|
65
|
+
public Object visitFCallNode(FCallNode node) { return update(37); }
|
66
|
+
public Object visitFalseNode(FalseNode node) { return update(38); }
|
67
|
+
public Object visitFixnumNode(FixnumNode node) { return update(39); }
|
68
|
+
public Object visitFlipNode(FlipNode node) { return update(40); }
|
69
|
+
public Object visitFloatNode(FloatNode node) { return update(41); }
|
70
|
+
public Object visitForNode(ForNode node) { return update(42); }
|
71
|
+
public Object visitGlobalAsgnNode(GlobalAsgnNode node) { return update(43); }
|
72
|
+
public Object visitGlobalVarNode(GlobalVarNode node) { return update(44); }
|
73
|
+
public Object visitHashNode(HashNode node) { return update(45); }
|
74
|
+
public Object visitInstAsgnNode(InstAsgnNode node) { return update(46); }
|
75
|
+
public Object visitInstVarNode(InstVarNode node) { return update(47); }
|
76
|
+
public Object visitIfNode(IfNode node) { return update(48); }
|
77
|
+
public Object visitIterNode(IterNode node) { return update(49); }
|
78
|
+
public Object visitLocalAsgnNode(LocalAsgnNode node) { return update(50); }
|
79
|
+
public Object visitLocalVarNode(LocalVarNode node) { return update(51); }
|
80
|
+
public Object visitMultipleAsgnNode(MultipleAsgnNode node) { return update(52); }
|
81
|
+
public Object visitMatch2Node(Match2Node node) { return update(54); }
|
82
|
+
public Object visitMatch3Node(Match3Node node) { return update(55); }
|
83
|
+
public Object visitMatchNode(MatchNode node) { return update(56); }
|
84
|
+
public Object visitModuleNode(ModuleNode node) { return update(57); }
|
85
|
+
public Object visitNewlineNode(NewlineNode node) { return update(58); }
|
86
|
+
public Object visitNextNode(NextNode node) { return update(59); }
|
87
|
+
public Object visitNilNode(NilNode node) { return update(60); }
|
88
|
+
public Object visitNotNode(NotNode node) { return update(61); }
|
89
|
+
public Object visitNthRefNode(NthRefNode node) { return update(62); }
|
90
|
+
public Object visitOpElementAsgnNode(OpElementAsgnNode node) { return update(63); }
|
91
|
+
public Object visitOpAsgnNode(OpAsgnNode node) { return update(64); }
|
92
|
+
public Object visitOpAsgnAndNode(OpAsgnAndNode node) { return update(65); }
|
93
|
+
public Object visitOpAsgnOrNode(OpAsgnOrNode node) { return update(66); }
|
94
|
+
public Object visitOrNode(OrNode node) { return update(67); }
|
95
|
+
public Object visitPreExeNode(PreExeNode node) { return update(68); }
|
96
|
+
public Object visitPostExeNode(PostExeNode node) { return update(69); }
|
97
|
+
public Object visitRedoNode(RedoNode node) { return update(70); }
|
98
|
+
public Object visitRegexpNode(RegexpNode node) { return update(71); }
|
99
|
+
public Object visitRescueBodyNode(RescueBodyNode node) { return update(72); }
|
100
|
+
public Object visitRescueNode(RescueNode node) { return update(73); }
|
101
|
+
public Object visitRestArgNode(RestArgNode node) { return update(74); }
|
102
|
+
public Object visitRetryNode(RetryNode node) { return update(75); }
|
103
|
+
public Object visitReturnNode(ReturnNode node) { return update(76); }
|
104
|
+
public Object visitRootNode(RootNode node) { return update(77); }
|
105
|
+
public Object visitSClassNode(SClassNode node) { return update(78); }
|
106
|
+
public Object visitSelfNode(SelfNode node) { return update(79); }
|
107
|
+
public Object visitSplatNode(SplatNode node) { return update(80); }
|
108
|
+
public Object visitStrNode(StrNode node) { return update(81); }
|
109
|
+
public Object visitSuperNode(SuperNode node) { return update(82); }
|
110
|
+
public Object visitSValueNode(SValueNode node) { return update(83); }
|
111
|
+
public Object visitSymbolNode(SymbolNode node) { return update(84); }
|
112
|
+
public Object visitToAryNode(ToAryNode node) { return update(85); }
|
113
|
+
public Object visitTrueNode(TrueNode node) { return update(86); }
|
114
|
+
public Object visitUndefNode(UndefNode node) { return update(87); }
|
115
|
+
public Object visitUntilNode(UntilNode node) { return update(88); }
|
116
|
+
public Object visitVAliasNode(VAliasNode node) { return update(89); }
|
117
|
+
public Object visitVCallNode(VCallNode node) { return update(90); }
|
118
|
+
public Object visitWhenNode(WhenNode node) { return update(91); }
|
119
|
+
public Object visitWhileNode(WhileNode node) { return update(92); }
|
120
|
+
public Object visitXStrNode(XStrNode node) { return update(93); }
|
121
|
+
public Object visitYieldNode(YieldNode node) { return update(94); }
|
122
|
+
public Object visitZArrayNode(ZArrayNode node) { return update(95); }
|
123
|
+
public Object visitZSuperNode(ZSuperNode node) { return update(96); }
|
124
|
+
|
125
|
+
private Object update(int n) {
|
126
|
+
hashCode = hashCode * 13 + n;
|
127
|
+
return this;
|
128
|
+
}
|
129
|
+
|
130
|
+
// FIXME: I don't know this fits into the grand scheme of things...Let's see about test coverage.
|
131
|
+
@Override
|
132
|
+
public Object visitArgumentNode(ArgumentNode an) {
|
133
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
134
|
+
}
|
135
|
+
|
136
|
+
@Override
|
137
|
+
public Object visitBlockArg18Node(BlockArg18Node node) {
|
138
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
139
|
+
}
|
140
|
+
|
141
|
+
@Override
|
142
|
+
public Object visitCommentNode(CommentNode node) {
|
143
|
+
throw new UnsupportedOperationException("Not supported yet.");
|
144
|
+
}
|
145
|
+
|
146
|
+
@Override
|
147
|
+
public Object visitImplicitNilNode(ImplicitNilNode kan) {
|
148
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
149
|
+
}
|
150
|
+
|
151
|
+
@Override
|
152
|
+
public Object visitKeywordArgNode(KeywordArgNode kan) {
|
153
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
154
|
+
}
|
155
|
+
|
156
|
+
@Override
|
157
|
+
public Object visitKeywordRestArgNode(KeywordRestArgNode kran) {
|
158
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
159
|
+
}
|
160
|
+
|
161
|
+
@Override
|
162
|
+
public Object visitLambdaNode(LambdaNode node) {
|
163
|
+
throw new UnsupportedOperationException("Not supported yet.");
|
164
|
+
}
|
165
|
+
|
166
|
+
@Override
|
167
|
+
public Object visitLiteralNode(LiteralNode node) {
|
168
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
169
|
+
}
|
170
|
+
|
171
|
+
@Override
|
172
|
+
public Object visitListNode(ListNode ln) {
|
173
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
174
|
+
}
|
175
|
+
|
176
|
+
@Override
|
177
|
+
public Object visitMethodNameNode(MethodNameNode mnn) {
|
178
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
179
|
+
}
|
180
|
+
|
181
|
+
@Override
|
182
|
+
public Object visitOptArgNode(OptArgNode oan) {
|
183
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
184
|
+
}
|
185
|
+
|
186
|
+
@Override
|
187
|
+
public Object visitSyntaxNode(SyntaxNode node) {
|
188
|
+
throw new UnsupportedOperationException("Not supported yet.");
|
189
|
+
}
|
190
|
+
|
191
|
+
@Override
|
192
|
+
public Object visitUnaryCallNode(UnaryCallNode kan) {
|
193
|
+
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
194
|
+
}
|
195
|
+
|
196
|
+
|
197
|
+
}
|
198
|
+
}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
package org.cx4a.rsense.util;
|
2
|
+
|
3
|
+
import org.jrubyparser.ast.Node;
|
4
|
+
import org.jrubyparser.SourcePosition;
|
5
|
+
|
6
|
+
import org.cx4a.rsense.typing.vertex.Vertex;
|
7
|
+
|
8
|
+
public class SourceLocation {
|
9
|
+
private String file;
|
10
|
+
private int line;
|
11
|
+
|
12
|
+
public SourceLocation(String file, int line) {
|
13
|
+
this.file = file;
|
14
|
+
this.line = line;
|
15
|
+
}
|
16
|
+
|
17
|
+
public String getFile() {
|
18
|
+
return file;
|
19
|
+
}
|
20
|
+
|
21
|
+
public int getLine() {
|
22
|
+
return line;
|
23
|
+
}
|
24
|
+
|
25
|
+
@Override
|
26
|
+
public int hashCode() {
|
27
|
+
return line ^ (file != null ? file.hashCode() : 0);
|
28
|
+
}
|
29
|
+
|
30
|
+
@Override
|
31
|
+
public boolean equals(Object other) {
|
32
|
+
if (this == other)
|
33
|
+
return true;
|
34
|
+
else if (!(other instanceof SourceLocation))
|
35
|
+
return false;
|
36
|
+
|
37
|
+
SourceLocation o = (SourceLocation) other;
|
38
|
+
return line == o.line
|
39
|
+
&& ((file == null && o.file == null)
|
40
|
+
|| (file != null && file.equals(o.file)));
|
41
|
+
}
|
42
|
+
|
43
|
+
@Override
|
44
|
+
public String toString() {
|
45
|
+
return file + ":" + line;
|
46
|
+
}
|
47
|
+
|
48
|
+
public static SourceLocation of(Node node) {
|
49
|
+
SourcePosition pos = node.getPosition();
|
50
|
+
//TODO : find out about SourcePosition.INVALID_POSITION
|
51
|
+
// if (pos != null && pos != SourcePosition.INVALID_POSITION) {
|
52
|
+
// return new SourceLocation(pos.getFile(), pos.getStartLine() + 1);
|
53
|
+
// } else {
|
54
|
+
// return null;
|
55
|
+
// }
|
56
|
+
if (pos != null) {
|
57
|
+
return new SourceLocation(pos.getFile(), pos.getStartLine() + 1);
|
58
|
+
} else {
|
59
|
+
return null;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
public static SourceLocation of(Vertex vertex) {
|
64
|
+
if (vertex != null && vertex.getNode() != null) {
|
65
|
+
return of(vertex.getNode());
|
66
|
+
} else {
|
67
|
+
return null;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
package org.cx4a.rsense.util;
|
2
|
+
|
3
|
+
import java.util.List;
|
4
|
+
import java.util.ArrayList;
|
5
|
+
|
6
|
+
public class StringUtil {
|
7
|
+
private StringUtil() {}
|
8
|
+
|
9
|
+
public static String[] shellwords(String command) {
|
10
|
+
List<String> result = new ArrayList<String>();
|
11
|
+
char[] cs = command.toCharArray();
|
12
|
+
int len = cs.length;
|
13
|
+
StringBuilder sb = null;
|
14
|
+
boolean escape = false;
|
15
|
+
char quote = 0;
|
16
|
+
for (int i = 0; i < len; ) {
|
17
|
+
char c = cs[i++];
|
18
|
+
|
19
|
+
// Skip whitespaces
|
20
|
+
if (!escape && quote == 0) {
|
21
|
+
while (i < len && Character.isWhitespace(c)) {
|
22
|
+
if (sb != null) {
|
23
|
+
result.add(sb.toString());
|
24
|
+
sb = null;
|
25
|
+
}
|
26
|
+
c = cs[i++];
|
27
|
+
}
|
28
|
+
if (i > len) {
|
29
|
+
break;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
// New field
|
34
|
+
if (sb == null) {
|
35
|
+
sb = new StringBuilder();
|
36
|
+
}
|
37
|
+
|
38
|
+
// Append character
|
39
|
+
if (escape) {
|
40
|
+
sb.append(c);
|
41
|
+
escape = false;
|
42
|
+
} else if (c == quote) {
|
43
|
+
quote = 0;
|
44
|
+
} else {
|
45
|
+
switch (c) {
|
46
|
+
case '"': case '\'':
|
47
|
+
quote = c;
|
48
|
+
break;
|
49
|
+
case '\\':
|
50
|
+
escape = true;
|
51
|
+
break;
|
52
|
+
default:
|
53
|
+
sb.append(c);
|
54
|
+
break;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
if (sb != null) {
|
59
|
+
result.add(sb.toString());
|
60
|
+
}
|
61
|
+
return result.toArray(new String[0]);
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
rsense.version = 0.5.0
|
@@ -0,0 +1,3006 @@
|
|
1
|
+
# -*- coding: undecided -*-
|
2
|
+
# ruby 1.8.7 builtin library stub
|
3
|
+
# http://doc.okkez.net/187/view/library/
|
4
|
+
|
5
|
+
BOOLEAN = true || false
|
6
|
+
|
7
|
+
module Enumerable; end
|
8
|
+
module Precision; end
|
9
|
+
class IO; end
|
10
|
+
class File < IO; end
|
11
|
+
module File::Constants; end
|
12
|
+
|
13
|
+
##% Array<t>
|
14
|
+
class Array
|
15
|
+
# FIXME to_ary for +, -, &
|
16
|
+
|
17
|
+
include Enumerable
|
18
|
+
|
19
|
+
##% self.[](*a) -> a
|
20
|
+
def self.[](*item) item end
|
21
|
+
##% self.new(?Integer, ?a) -> Array<a>
|
22
|
+
##% self.new<a | a <= Array>(?a) -> a
|
23
|
+
##% self.new<v>(Integer) {Integer -> v} -> Array<v>
|
24
|
+
def self.new(*) end
|
25
|
+
|
26
|
+
# FIXME to_ary
|
27
|
+
|
28
|
+
##% &<v>(Array<v>) -> Array<t or v>
|
29
|
+
def &(other) self || other end
|
30
|
+
##% "*"(Integer) -> Array<t>
|
31
|
+
##% "*"(String) -> String
|
32
|
+
def *(times) self end
|
33
|
+
##% +(Array<v>) -> Array<t or v>
|
34
|
+
def +(other) self || other end
|
35
|
+
##% -(Array<v>) -> Array<t or v>
|
36
|
+
def -(other) self || other end
|
37
|
+
##% "<<"<v | v <= t>(v) -> self
|
38
|
+
def <<(obj) self end
|
39
|
+
##% "<=>"(a) -> Fixnum
|
40
|
+
def <=>(other) 0 end
|
41
|
+
##% ==(a) -> Boolean
|
42
|
+
def ==(other) BOOLEAN end
|
43
|
+
##% [](Integer) -> t
|
44
|
+
##% [](Range) -> Array<t>
|
45
|
+
##% [](Integer, Integer) -> Array<t>
|
46
|
+
def [](*) at(0) end
|
47
|
+
##% []=<v | v <= t>(Integer, v) -> v
|
48
|
+
##% []=<v | v <= t>(Range, Array<v>) -> Array<v>
|
49
|
+
##% []=<v | v <= t>(Integer, Integer, Array<v>) -> Array<v>
|
50
|
+
def []=(*) self end
|
51
|
+
# FIXME
|
52
|
+
##% assoc<k, v | t <= (k, v)>(k) -> v
|
53
|
+
def assoc(key) [0][1] end
|
54
|
+
##% at(Integer) -> t
|
55
|
+
def at(pos) _e end
|
56
|
+
##% choice() -> t
|
57
|
+
def choice() [0] end
|
58
|
+
# FIXME
|
59
|
+
##% clear() -> self
|
60
|
+
def clear() self end
|
61
|
+
##% clone() -> Array<t>
|
62
|
+
def clone() self end
|
63
|
+
alias :dup :clone
|
64
|
+
# FIXME
|
65
|
+
##% collect!() {t -> ?} -> self
|
66
|
+
##% collect!() -> Enumerator<self, t>
|
67
|
+
def collect!() yield _e; self end
|
68
|
+
alias :map! :collect!
|
69
|
+
##% combination(Integer) {Array<t> -> ?} -> Array<Array<t> >
|
70
|
+
##% combination(Integer) -> Enumerator<Array<Array<t> >, Array<t> >
|
71
|
+
def combination(n) yield [_e]; [[_e]] end
|
72
|
+
##% compact() -> Array<t>
|
73
|
+
def compact() self end
|
74
|
+
##% compact!() -> self
|
75
|
+
def compact!() self end
|
76
|
+
##% concat<v | v <= t>(Array<v>) -> self
|
77
|
+
def concat(other) self end
|
78
|
+
##% cycle() {t -> ?} -> self
|
79
|
+
def cycle() yield _e; self end
|
80
|
+
##% delete(a) -> a
|
81
|
+
##% delete<v>(a) {() -> v} -> v
|
82
|
+
def delete(val) val end
|
83
|
+
##% delete_at(Integer) -> t
|
84
|
+
def delete_at(pos) _e end
|
85
|
+
##% delete_if() -> Enumerator<self, t>
|
86
|
+
##% delete_if() {t -> ?} -> self
|
87
|
+
def delete_if() self end
|
88
|
+
alias :reject! :delete_if
|
89
|
+
##% each() {t -> ?} -> self
|
90
|
+
##% each() -> Enumerator<self, t>
|
91
|
+
def each() yield _e; self end
|
92
|
+
##% each_index() {Integer -> ?} -> self
|
93
|
+
##% each_index() -> Enumerator<self, Integer>
|
94
|
+
def each_index() yield 0; self end
|
95
|
+
##% empty?() -> Boolean
|
96
|
+
def empty?() Boolean end
|
97
|
+
##% eql?(a) -> Boolean
|
98
|
+
def eql?(other) BOOLEAN end
|
99
|
+
##% fetch(Integer) -> t
|
100
|
+
##% fetch(Integer, ifnone) -> t or ifnone
|
101
|
+
##% fetch<v>(Integer) {Integer -> v} -> t or v
|
102
|
+
def fetch(nth, ifnone = nil) _e || ifnone end
|
103
|
+
##% fill<v | v <= t>(v) -> self
|
104
|
+
##% fill<v | v <= t>() {Integer -> v} -> self
|
105
|
+
##% fill<v | v <= t>(v, Integer, ?Integer) -> self
|
106
|
+
##% fill<v | v <= t>(v, Range) -> self
|
107
|
+
##% fill<v | v <= t>(Integer, ?Integer) {Integer -> v} -> self
|
108
|
+
##% fill<v | v <= t>(Range) {Integer -> v} -> self
|
109
|
+
def fill(*) self end
|
110
|
+
##% first() -> t
|
111
|
+
##% first(Integer) -> Array<t>
|
112
|
+
def first(n = nil) _e end
|
113
|
+
# FIXME
|
114
|
+
##% flatten(?Integer) -> Array<t>
|
115
|
+
def flatten(lv = nil) self end
|
116
|
+
# FIXME
|
117
|
+
##% flatten!(?Integer) -> self
|
118
|
+
def flatten!(lv = nil) self end
|
119
|
+
##% hash() -> Integer
|
120
|
+
def hash() 0 end
|
121
|
+
##% include?(a) -> Boolean
|
122
|
+
def include?(val) Boolean end
|
123
|
+
##% index(a) -> Integer
|
124
|
+
##% index() {t -> ?} -> Integer
|
125
|
+
def index(val) 0 end
|
126
|
+
##% indexes(*a) -> Array<t>
|
127
|
+
def indexes(*index) self end
|
128
|
+
##% insert<v | v <= Array<t> >(Integer, *v) -> self
|
129
|
+
def insert(nth, *val) self end
|
130
|
+
##% join (?String) -> String
|
131
|
+
def join(sep = $,) '' end
|
132
|
+
##% last() -> t
|
133
|
+
##% last(Integer) -> Array<t>
|
134
|
+
def last(n = nil) _e end
|
135
|
+
##% length() -> Integer
|
136
|
+
def length() 0 end
|
137
|
+
alias :size :length
|
138
|
+
##% nitems() -> Integer
|
139
|
+
##% nitems() {t -> ?} -> Integer
|
140
|
+
def nitems() 0 end
|
141
|
+
##% pack(String) -> String
|
142
|
+
def pack(template) '' end
|
143
|
+
##% permutation(Integer) {Array<t> -> ?} -> Array<Array<t> >
|
144
|
+
##% permutation(Integer) -> Enumerator<Array<Array<t> >, Array<t> >
|
145
|
+
def permutation(n) yield [_e]; [[_e]] end
|
146
|
+
##% pop() -> t
|
147
|
+
##% pop(Integer) -> Array<t>
|
148
|
+
def pop(n = 1) [0] end
|
149
|
+
# FIXME
|
150
|
+
def product(*) [[_e]] end
|
151
|
+
##% push<v | v <= Array<t> >(*v) -> self
|
152
|
+
def push(*obj) self end
|
153
|
+
##% rassoc<k, v | t <= (k, v)>(v) -> k
|
154
|
+
def rassoc(obj) [0][0] end
|
155
|
+
# FIXME
|
156
|
+
##% replace(Array<t>) -> self
|
157
|
+
def replace(another) self end
|
158
|
+
##% reverse() -> Array<t>
|
159
|
+
def reverse() self end
|
160
|
+
##% reverse!() -> self
|
161
|
+
def reverse!() self end
|
162
|
+
##% reverse_each() {t -> ?} -> self
|
163
|
+
##% reverse_each() -> Enumerator<self, t>
|
164
|
+
def reverse_each() yield _e; self end
|
165
|
+
##% rindex<v>(v) -> Integer
|
166
|
+
##% rindex<v>() {Integer -> ?} -> Integer
|
167
|
+
def rindex(val) end
|
168
|
+
##% shift() -> t
|
169
|
+
##% shift(Integer) -> Array<t>
|
170
|
+
def shift() _e end
|
171
|
+
##% shuffle() -> Array<t>
|
172
|
+
def shuffle() self end
|
173
|
+
##% shuffle!() -> self
|
174
|
+
def shuffle!() self end
|
175
|
+
alias :slice :[]
|
176
|
+
alias :slice! :[]
|
177
|
+
##% sort() -> Array<t>
|
178
|
+
##% sort() {(t, t) -> ?} -> Array<t>
|
179
|
+
def sort() self end
|
180
|
+
##% sort!() -> self
|
181
|
+
##% sort!() {(t, t) -> ?} -> self
|
182
|
+
def sort!() self end
|
183
|
+
##% to_a() -> Array<t>
|
184
|
+
def to_a() self end
|
185
|
+
##% to_ary() -> self
|
186
|
+
def to_ary() self end
|
187
|
+
##% to_s() -> String
|
188
|
+
def to_s() '' end
|
189
|
+
# FIXME
|
190
|
+
def transpose() self end
|
191
|
+
##% uniq() -> Array<t>
|
192
|
+
def uniq() self end
|
193
|
+
##% uniq!() -> self
|
194
|
+
def uniq!() self end
|
195
|
+
##% unshift<v | v <= Array<t> >(*v) -> self
|
196
|
+
def unshift(*obj) self end
|
197
|
+
# FIXME
|
198
|
+
##% values_at<k, v | t <= (k, v)>(*a) -> Array<v>
|
199
|
+
def values_at(*index) self end
|
200
|
+
# FIXME zip
|
201
|
+
##% "|"<v>(Array<v>) -> Array<t or v>
|
202
|
+
def |(other) self || other end
|
203
|
+
end
|
204
|
+
|
205
|
+
class Bignum
|
206
|
+
### Precision
|
207
|
+
##% self.induced_from(a) -> Bignum
|
208
|
+
def self.induced_from(number) 0 end
|
209
|
+
##% prec(Class) -> Bignum
|
210
|
+
def prec(klass) 0 end
|
211
|
+
|
212
|
+
### Numeric
|
213
|
+
##% +@() -> self
|
214
|
+
def +@() self end
|
215
|
+
##% -@() -> Bignum
|
216
|
+
def -@() 0 end
|
217
|
+
##% "<=>"(other) -> Fixnum
|
218
|
+
def <=>(other) 0 end
|
219
|
+
##% abs() -> Bignum
|
220
|
+
def abs() self end
|
221
|
+
##% ceil() -> Bignum
|
222
|
+
def ceil() 0 end
|
223
|
+
##% clone() -> self
|
224
|
+
def clone() self end
|
225
|
+
alias :dup :clone
|
226
|
+
##% coerce(Float) -> (Float, Float)
|
227
|
+
##% coerce(Numeric) -> (Bignum, Bignum)
|
228
|
+
def coerce(other) [0.0, 0.0] end
|
229
|
+
##% div(Numeric) -> Bignum
|
230
|
+
def div(other) 0 end
|
231
|
+
##% divmod(Numeric) -> (Bignum, Numeric)
|
232
|
+
def divmod(other) [0, 0] end
|
233
|
+
##% eql?(Numeric) -> Boolean
|
234
|
+
def eql?(other) BOOLEAN end
|
235
|
+
##% quo(Numeric) -> Float
|
236
|
+
def quo(other) 0.0 end
|
237
|
+
##% fdiv(Numeric) -> Float
|
238
|
+
def fdiv(other) 0.0 end
|
239
|
+
##% floor() -> Bignum
|
240
|
+
def floor() 0 end
|
241
|
+
##% integer?() -> Boolean
|
242
|
+
def integer?() BOOLEAN end
|
243
|
+
##% modulo(Numeric) -> Bignum
|
244
|
+
def modulo(other) 0 end
|
245
|
+
##% nonzero?() -> self
|
246
|
+
def nonzero?() self end
|
247
|
+
##% remainder(Numeric) -> Bignum
|
248
|
+
def remainder(other) 0 end
|
249
|
+
##% round() -> Integer
|
250
|
+
def round() 0 end
|
251
|
+
##% step<a | a <= Numeric>(Numeric, ?a) {self or a or Fixnum -> ?} -> self
|
252
|
+
##% step<a | a <= Numeric>(Numeric, ?a) -> Enumerable::Enumerator<self, self or a or Fixnum>
|
253
|
+
def step(limit, step = 1) self end
|
254
|
+
##% to_int() -> Bignum
|
255
|
+
def to_int() 0 end
|
256
|
+
##% truncate() -> Bignum
|
257
|
+
def truncate() 0 end
|
258
|
+
##% zero?() -> Boolean
|
259
|
+
def zero?() BOOLEAN end
|
260
|
+
end
|
261
|
+
|
262
|
+
class Binding
|
263
|
+
def eval(*) end
|
264
|
+
end
|
265
|
+
|
266
|
+
class Class
|
267
|
+
# FIXME self.new
|
268
|
+
|
269
|
+
##% _load(String) -> Class
|
270
|
+
def _load(str) Class.new end
|
271
|
+
def allocate() new() end
|
272
|
+
##% superclass() -> Class
|
273
|
+
def superclass() Class.new end
|
274
|
+
|
275
|
+
private
|
276
|
+
def inherited(subclass) end
|
277
|
+
end
|
278
|
+
|
279
|
+
module Comparable
|
280
|
+
##% "<"(a) -> Boolean
|
281
|
+
def <(other) BOOLEAN end
|
282
|
+
##% "<="(a) -> Boolean
|
283
|
+
def <=(other) BOOLEAN end
|
284
|
+
##% ==(a) -> Boolean
|
285
|
+
def ==(other) BOOLEAN end
|
286
|
+
##% ">"(a) -> Boolean
|
287
|
+
def >(other) BOOLEAN end
|
288
|
+
##% ">="(a) -> Boolean
|
289
|
+
def >=(other) BOOLEAN end
|
290
|
+
##% between?(a, b) -> Boolean
|
291
|
+
def between?(min, max) BOOLEAN end
|
292
|
+
end
|
293
|
+
|
294
|
+
class Continuation
|
295
|
+
# FIXME
|
296
|
+
end
|
297
|
+
|
298
|
+
class Data
|
299
|
+
end
|
300
|
+
|
301
|
+
##% Dir<| t <= String>
|
302
|
+
class Dir
|
303
|
+
include Enumerable
|
304
|
+
|
305
|
+
##% self.[](*String) -> Array<String>
|
306
|
+
def self.[](*pattern) [''] end
|
307
|
+
##% self.glob(String, ?Integer) -> Array<String>
|
308
|
+
##% self.glob(String, ?Integer) {String -> ?} -> nil
|
309
|
+
def self.glob(pattern, flags = 0) [''] end
|
310
|
+
##% self.chdir() -> Fixnum
|
311
|
+
##% self.chdir(String) -> Fixnum
|
312
|
+
##% self.chdir<v>() {String -> v} -> v
|
313
|
+
##% self.chdir<v>(String) {String -> v} -> v
|
314
|
+
def self.chdir(path = nil) 0 end
|
315
|
+
##% self.chroot(String) -> Fixnum
|
316
|
+
def self.chroot(path) 0 end
|
317
|
+
##% self.delete(String) -> Fixnum
|
318
|
+
def self.delete(path) 0 end
|
319
|
+
##% self.rmdir(String) -> Fixnum
|
320
|
+
def self.rmdir(path) 0 end
|
321
|
+
##% self.unlink(String) -> Fixnum
|
322
|
+
def self.unlink(path) 0 end
|
323
|
+
##% self.entries(String) -> Array<String>
|
324
|
+
def self.entires(path) [''] end
|
325
|
+
##% self.foreach(String) {String -> ?} -> nil
|
326
|
+
##% self.foreach(String) -> Enumerator<nil, String>
|
327
|
+
def foreach(path) yield ''; nil end
|
328
|
+
##% self.getwd() -> String
|
329
|
+
def self.getwd() '' end
|
330
|
+
##% self.pwd() -> String
|
331
|
+
def self.pwd() '' end
|
332
|
+
##% self.mkdir(String, ?Integer) -> Fixnum
|
333
|
+
def self.mkdir(path, mode = 0777) 0 end
|
334
|
+
##% self.new(String) -> Dir
|
335
|
+
def self.new(path) Dir.new('') end
|
336
|
+
##% self.open(String) -> Dir
|
337
|
+
##% self.open<v>(String) {Dir -> v} -> v
|
338
|
+
def self.open(path) Dir.new('') end
|
339
|
+
|
340
|
+
##% close() -> nil
|
341
|
+
def close() end
|
342
|
+
##% each() {String -> ?} -> self
|
343
|
+
##% each() -> Enumerator<self, t>
|
344
|
+
def each() yield ''; self end
|
345
|
+
##% path() -> String
|
346
|
+
def path() '' end
|
347
|
+
##% pos() -> Integer
|
348
|
+
def pos() 0 end
|
349
|
+
alias :tell :pos
|
350
|
+
##% pos=(Integer) -> self
|
351
|
+
def pos=(pos) self end
|
352
|
+
##% seek(Integer) -> self
|
353
|
+
def seek(pos) self end
|
354
|
+
##% read() -> String
|
355
|
+
def read() '' end
|
356
|
+
##% rewind() -> self
|
357
|
+
def rewind() self end
|
358
|
+
end
|
359
|
+
|
360
|
+
##% Enumerable<t>
|
361
|
+
module Enumerable
|
362
|
+
##% all?() -> Boolean
|
363
|
+
##% all?() {t -> ?} -> Boolean
|
364
|
+
def all?() yield self; BOOLEAN end
|
365
|
+
##% any?() -> Boolean
|
366
|
+
##% any?() {t -> ?} -> Boolean
|
367
|
+
def any?() yield self; BOOLEAN end
|
368
|
+
##% collect<v>() {t -> v} -> Array<v>
|
369
|
+
def collect() [yield(self)] end
|
370
|
+
alias :map :collect
|
371
|
+
##% count() -> Integer
|
372
|
+
##% count(a) -> Integer
|
373
|
+
##% count() {t -> ?} -> Integer
|
374
|
+
def count(item = nil) yield self; 0 end
|
375
|
+
##% cycle() -> Enumerator<self, t>
|
376
|
+
##% cycle() {t -> ?} -> ?
|
377
|
+
def cycle() yield self end
|
378
|
+
# FIXME ifnone
|
379
|
+
##% find<v>(?a) -> Enumerator<t or a, t>
|
380
|
+
##% find<v>(?a) {t -> ?} -> t or a
|
381
|
+
def find(ifnone = nil) yield self end
|
382
|
+
alias :detect :find
|
383
|
+
##% drop(Integer) -> Array<t>
|
384
|
+
def drop(n) to_a end
|
385
|
+
##% drop_while() -> Enumerator<Array<t>, t>
|
386
|
+
##% drop_while() {t -> ?} -> Array<t>
|
387
|
+
def drop_while() yield _e end
|
388
|
+
# FIXME 3
|
389
|
+
##% each_cons(Integer) -> Enumerator<nil, (t, t, t)>
|
390
|
+
##% each_cons(Integer) {(t, t, t) -> ?} -> nil
|
391
|
+
def each_cons(n) yield _e, _e, _e end
|
392
|
+
alias :enum_cons :each_cons
|
393
|
+
##% each_with_index() -> Enumerator<self, (t, Integer)>
|
394
|
+
##% each_with_index() {(t, Integer) -> ?} -> self
|
395
|
+
def each_with_index() yield _e, 0 end
|
396
|
+
alias :enum_with_index :each_with_index
|
397
|
+
##% to_a() -> Array<t>
|
398
|
+
def to_a() [_e] end
|
399
|
+
alias :entries :to_a
|
400
|
+
##% find_all() -> Enumerator<Array<t>, t>
|
401
|
+
##% find_all() {t -> ?} -> Array<t>
|
402
|
+
def find_all() yield _e; [_e] end
|
403
|
+
alias :select :find_all
|
404
|
+
##% find_index() -> Enumerator<Integer, t>
|
405
|
+
##% find_index() {t -> ?} -> Integer
|
406
|
+
def find_index() yield _e; 0 end
|
407
|
+
##% first() -> t
|
408
|
+
##% first(Integer) -> Array<t>
|
409
|
+
def first(n = nil) _e end
|
410
|
+
# FIXME ===
|
411
|
+
##% grep(a) -> Array<t>
|
412
|
+
##% grep<v>(a) {t -> v} -> Array<v>
|
413
|
+
def grep(pattern) [_e] end
|
414
|
+
##% group_by() -> Enumerator<Hash<?, Array<t> >, t>
|
415
|
+
##% group_by<v>() {t -> v} -> Hash<v, Array<t> >
|
416
|
+
def group_by() {(yield _e) => [_e]} end
|
417
|
+
# FIXME ==
|
418
|
+
##% member?(a) -> Boolean
|
419
|
+
def member?(val) BOOLEAN end
|
420
|
+
alias :include? :member?
|
421
|
+
# FIXME sym
|
422
|
+
##% inject(?a) {(r or init or t) -> r} -> r or init
|
423
|
+
##% inject(Symbol) -> t
|
424
|
+
##% inject(a, Symbol) -> t or a
|
425
|
+
def inject(*) _e end
|
426
|
+
alias :reduce :inject
|
427
|
+
##% max() -> t
|
428
|
+
##% max() {(t, t) -> ?} -> t
|
429
|
+
def max() _e end
|
430
|
+
##% max_by() -> Enumerator<t, t>
|
431
|
+
##% max_by() {t -> ?} -> t
|
432
|
+
def max_by() yield t; t end
|
433
|
+
##% min() -> t
|
434
|
+
##% min() {(t, t) -> ?} -> t
|
435
|
+
def min() _e end
|
436
|
+
##% min_by() -> Enumerator<t, t>
|
437
|
+
##% min_by() {t -> ?} -> t
|
438
|
+
def min_by() yield t; t end
|
439
|
+
##% minmax() -> (t, t)
|
440
|
+
##% minmax() {(t, t) -> ?} -> (t, t)
|
441
|
+
def minmax() [_e, _e] end
|
442
|
+
##% minmax_by() -> Enumerator<(t, t), t>
|
443
|
+
##% minmax_by() {t -> ?} -> (t, t)
|
444
|
+
def minmax_by() yield _e; [_e, _e] end
|
445
|
+
##% none?() -> Boolean
|
446
|
+
##% none?() {t -> ?} -> Boolean
|
447
|
+
def none?() BOOLEAN end
|
448
|
+
##% one?() -> Boolean
|
449
|
+
##% one?() {t -> ?} -> Boolean
|
450
|
+
def one?() BOOLEAN end
|
451
|
+
##% partition() -> Enumerator<(t, t), t>
|
452
|
+
##% partition() {t -> ?} -> (t, t)
|
453
|
+
def partition() yield _e; [_e, _e] end
|
454
|
+
##% reject() -> Enumerator<Array<t>, t>
|
455
|
+
##% reject() {t -> ?} -> Array<t>
|
456
|
+
def reject() yield _e; [_e] end
|
457
|
+
##% sort() -> Array<t>
|
458
|
+
##% sort() {(t, t) -> ?} -> Array<t>
|
459
|
+
def sort() [_e] end
|
460
|
+
##% sort_by() -> Enumerator<Array<t>, t>
|
461
|
+
##% sort_by() {t -> ?} -> Array<t>
|
462
|
+
def sort_by() yield _e; [_e] end
|
463
|
+
##% take(Integer) -> Array<t>
|
464
|
+
def take(n) [_e] end
|
465
|
+
##% take_while() -> Enumerator<Array<t>, t>
|
466
|
+
##% take_while() {t -> ?} -> Array<t>
|
467
|
+
def take_while() yield _e; [_e]; end
|
468
|
+
# FIXME
|
469
|
+
def zip(*) [[_e]] end
|
470
|
+
|
471
|
+
private
|
472
|
+
# Special methods for internal use
|
473
|
+
##% _e() -> t
|
474
|
+
def _e() end
|
475
|
+
end
|
476
|
+
|
477
|
+
##% Enumerator<s, t>
|
478
|
+
class Enumerator
|
479
|
+
include Enumerable
|
480
|
+
|
481
|
+
# FIXME self.new
|
482
|
+
|
483
|
+
##% each() {t -> ?} -> s
|
484
|
+
def each() end
|
485
|
+
##% next() -> t
|
486
|
+
def next() end
|
487
|
+
##% rewind() -> self
|
488
|
+
def rewind() self end
|
489
|
+
##% to_splat() -> Array<t>
|
490
|
+
def to_splat() [] end
|
491
|
+
##% with_index() -> Enumerator<s, (t, Integer)>
|
492
|
+
##% with_index() {(t, Integer) -> ?} -> s
|
493
|
+
def with_index() end
|
494
|
+
end
|
495
|
+
|
496
|
+
# 1.8.7 <=> 1.8.8
|
497
|
+
Enumerable::Enumerator = Enumerator
|
498
|
+
|
499
|
+
module Errno
|
500
|
+
end
|
501
|
+
|
502
|
+
class FalseClass
|
503
|
+
##% &(a) -> FalseClass
|
504
|
+
def %(other) false end
|
505
|
+
##% ^(a) -> Boolean
|
506
|
+
def ^(other) BOOLEAN end
|
507
|
+
##% to_s() -> String
|
508
|
+
def to_s() '' end
|
509
|
+
##% "|"(a) -> Boolean
|
510
|
+
def |(other) BOOLEAN end
|
511
|
+
end
|
512
|
+
|
513
|
+
class File
|
514
|
+
ALT_SEPARATOR = ''
|
515
|
+
PATH_SEPARATOR = ''
|
516
|
+
SEPARATOR = ''
|
517
|
+
Separator = ''
|
518
|
+
|
519
|
+
include File::Constants
|
520
|
+
|
521
|
+
##% self.atime(String or IO) -> Time
|
522
|
+
def self.atime(filename) Time.new end
|
523
|
+
##% self.basename(String, ?String) -> String
|
524
|
+
def self.basename(filename, suffix = '') '' end
|
525
|
+
##% self.blockdev?(String or IO) -> Boolean
|
526
|
+
def self.blockdev?(path) BOOLEAN end
|
527
|
+
##% self.chardev?(String or IO) -> Boolean
|
528
|
+
def self.chardev?(path) BOOLEAN end
|
529
|
+
##% self.chmod(Integer, *String) -> Integer
|
530
|
+
def self.chmod(mode, *filename) 0 end
|
531
|
+
##% self.chown(Integer, Integer, *String) -> Integer
|
532
|
+
def self.chown(owner, group, *filename) 0 end
|
533
|
+
##% self.ctime(String or IO) -> Time
|
534
|
+
def self.ctime(filename) Time.new end
|
535
|
+
##% self.delete(*String) -> Integer
|
536
|
+
def self.delete(*filename) 0 end
|
537
|
+
##% self.unlink(*String) -> Integer
|
538
|
+
def self.unlink(*filename) 0 end
|
539
|
+
##% self.directory?(String or IO) -> Boolean
|
540
|
+
def self.directory?(path) BOOLEAN end
|
541
|
+
##% self.dirname(String) -> String
|
542
|
+
def self.dirname(filename) '' end
|
543
|
+
##% self.executable?(String or IO) ->Boolean
|
544
|
+
def self.executable?(path) BOOLEAN end
|
545
|
+
##% self.executable_real?(String or IO) ->Boolean
|
546
|
+
def self.executable_real?(path) BOOLEAN end
|
547
|
+
##% self.exist?(String or IO) -> Boolean
|
548
|
+
def self.exist?(path) BOOLEAN end
|
549
|
+
##% self.exists?(String or IO) -> Boolean
|
550
|
+
def self.exists?(path) BOOLEAN end
|
551
|
+
##% self.expand_path(String, ?String) -> String
|
552
|
+
def self.expand_path(path, default_dir = '.') '' end
|
553
|
+
##% self.extname(String) -> String
|
554
|
+
def self.extname(filename) '' end
|
555
|
+
##% self.file?(String or IO) -> Boolean
|
556
|
+
def self.file?(path) BOOLEAN end
|
557
|
+
##% self.fnmatch(String, String, ?Integer) -> Boolean
|
558
|
+
def self.fnmatch(pattern, path, flags = 0) BOOLEAN end
|
559
|
+
##% self.fnmatch?(String, String, ?Integer) -> Boolean
|
560
|
+
def self.fnmatch?(pattern, path, flags = 0) BOOLEAN end
|
561
|
+
##% self.ftype(String) -> String
|
562
|
+
def self.ftype(filename) '' end
|
563
|
+
##% self.grpowned?(String or IO) -> Boolean
|
564
|
+
def self.grpowned?(filename) BOOLEAN end
|
565
|
+
##% self.identical?(String or IO, String or IO) -> Boolean
|
566
|
+
def self.identical?(filename1, filename2) BOOLEAN end
|
567
|
+
##% self.join(*String) -> String
|
568
|
+
def self.join(*item) '' end
|
569
|
+
##% self.lchmod(Integer, *String) -> Integer
|
570
|
+
def self.lchmod(mode, *filename) 0 end
|
571
|
+
##% self.lchown(Integer, Integer, *String) -> Integer
|
572
|
+
def self.lchown(owner, group, *filename) 0 end
|
573
|
+
##% self.link(String, String) -> Integer
|
574
|
+
def self.link(old, new) 0 end
|
575
|
+
##% self.lstat(String) -> File::Stat
|
576
|
+
def self.lstat(filename) File::Stat.new('') end
|
577
|
+
##% self.mtime(String or IO) -> Time
|
578
|
+
def self.mtime(filename) Time.new end
|
579
|
+
##% self.new(String or Integer, ?a, ?Integer) -> File
|
580
|
+
def self.new(path, mode = 'r', perm = 0666) File.new('') end
|
581
|
+
##% self.open(String or Integer, ?a, ?Integer) -> File
|
582
|
+
##% self.open(String or Integer, ?a, ?Integer) {File -> a} -> a
|
583
|
+
def self.open(path, mode = 'r', perm = 0666) File.new('') end
|
584
|
+
##% self.owned?(String or IO) -> Boolean
|
585
|
+
def self.owned?(path) BOOLEAN end
|
586
|
+
##% self.pipe?(String or IO) -> Boolean
|
587
|
+
def self.pipe?(path) BOOLEAN end
|
588
|
+
##% self.readable?(String or IO) -> Boolean
|
589
|
+
def self.readable?(path) BOOLEAN end
|
590
|
+
##% self.readable_real?(String or IO) -> Boolean
|
591
|
+
def self.readable_real?(path) BOOLEAN end
|
592
|
+
##% self.readlink(String) -> String
|
593
|
+
def self.readlink(path) '' end
|
594
|
+
##% self.rename(String, String) -> Integer
|
595
|
+
def self.rename(from, to) 0 end
|
596
|
+
##% self.setgid?(String or IO) -> Boolean
|
597
|
+
def self.setgid?(path) BOOLEAN end
|
598
|
+
##% self.setuid?(String or IO) -> Boolean
|
599
|
+
def self.setuid?(path) BOOLEAN end
|
600
|
+
##% self.size(String or IO) -> Integer
|
601
|
+
def self.size(path) 0 end
|
602
|
+
##% self.size?(String or IO) -> Boolean
|
603
|
+
def self.size?(path) BOOLEAN end
|
604
|
+
##% self.socket?(String or IO) -> Boolean
|
605
|
+
def self.socket?(path) BOOLEAN end
|
606
|
+
##% self.split(String) -> (String, String)
|
607
|
+
def self.split(pathname) ['', ''] end
|
608
|
+
##% self.stat(String) -> File::Stat
|
609
|
+
def self.stat(filename) File::Stat.new('') end
|
610
|
+
##% self.sticky?(String or IO) -> Boolean
|
611
|
+
def self.sticky?(path) BOOLEAN end
|
612
|
+
##% self.symlink(String, String) -> Integer
|
613
|
+
def self.symlink(old, new) 0 end
|
614
|
+
##% self.symlink?(String or IO) -> Boolean
|
615
|
+
def self.symlinky?(path) BOOLEAN end
|
616
|
+
##% self.truncate(String, Integer) -> Integer
|
617
|
+
def self.truncate(path, length) 0 end
|
618
|
+
##% self.umask(?Integer) -> Integer
|
619
|
+
def self.umask(umask = 0) 0 end
|
620
|
+
##% self.utime(Time or Integer, Time or Integer, *String) -> Integer
|
621
|
+
def self.utime(atime, mtime, *filename) 0 end
|
622
|
+
##% self.writable?(String or IO) -> Boolean
|
623
|
+
def self.writable?(path) BOOLEAN end
|
624
|
+
##% self.writable_real?(String or IO) -> Boolean
|
625
|
+
def self.writable_real?(path) BOOLEAN end
|
626
|
+
##% self.zero?(String or IO) -> Boolean
|
627
|
+
def self.zero?(path) BOOLEAN end
|
628
|
+
|
629
|
+
##% atime() -> Time
|
630
|
+
def atime() Time.new end
|
631
|
+
##% chmod(Integer) -> Integer
|
632
|
+
def chmod(mode) 0 end
|
633
|
+
##% chown(Integer, Integer) -> Integer
|
634
|
+
def chown(owner, group) 0 end
|
635
|
+
##% ctime() -> Time
|
636
|
+
def ctime() Time.new end
|
637
|
+
##% flock(Integer) -> Integer or FalseClass
|
638
|
+
def flock(operation) 0 || false end
|
639
|
+
##% lstat() -> File::Stat
|
640
|
+
def lstat() File::Stat.new('') end
|
641
|
+
##% mtime() -> Time
|
642
|
+
def mtime() Time.new end
|
643
|
+
##% path() -> String
|
644
|
+
def path() '' end
|
645
|
+
##% truncate(Integer) -> Integer
|
646
|
+
def truncate(length) 0 end
|
647
|
+
end
|
648
|
+
|
649
|
+
module File::Constants
|
650
|
+
APPEND = 0
|
651
|
+
BINARY = 0
|
652
|
+
CREAT = 0
|
653
|
+
EXCL = 0
|
654
|
+
FNM_CASEFOLD = 0
|
655
|
+
FNM_DOTMATCH = 0
|
656
|
+
FNM_NOESCAPE = 0
|
657
|
+
FNM_PATHNAME = 0
|
658
|
+
FNM_SYSCASE = 0
|
659
|
+
LOCK_EX = 0
|
660
|
+
LOCK_NB = 0
|
661
|
+
LOCK_SH = 0
|
662
|
+
LOCK_UN = 0
|
663
|
+
NOCTTY = 0
|
664
|
+
NONBLOCK = 0
|
665
|
+
RDONLY = 0
|
666
|
+
RDWR = 0
|
667
|
+
SYNC = 0
|
668
|
+
TRUNC = 0
|
669
|
+
WRONLY = 0
|
670
|
+
end
|
671
|
+
|
672
|
+
class File::Stat
|
673
|
+
include Comparable
|
674
|
+
|
675
|
+
##% self.new(String) -> File::Stat
|
676
|
+
def self.new(path) super() end
|
677
|
+
|
678
|
+
##% "<=>"(File::Stat) -> Fixnum
|
679
|
+
def <=>(o) 0 end
|
680
|
+
##% atime() -> Time
|
681
|
+
def atime() Time.new end
|
682
|
+
##% blksize() -> Integer
|
683
|
+
def blksize() 0 end
|
684
|
+
##% blockdev?() -> Boolean
|
685
|
+
def blockdev?() BOOLEAN end
|
686
|
+
##% blocks() -> Integer
|
687
|
+
def blocks() 0 end
|
688
|
+
##% chardev?() -> Boolean
|
689
|
+
def chardev?() BOOLEAN end
|
690
|
+
##% ctime() -> Time
|
691
|
+
def ctime() Time.new end
|
692
|
+
##% dev() -> Integer
|
693
|
+
def dev() 0 end
|
694
|
+
##% dev_major() -> Integer
|
695
|
+
def dev_major() 0 end
|
696
|
+
##% dev_minor() -> Integer
|
697
|
+
def dev_minor() 0 end
|
698
|
+
##% directory?() -> Boolean
|
699
|
+
def directory?() BOOLEAN end
|
700
|
+
##% executable?() -> Boolean
|
701
|
+
def executable?() BOOLEAN end
|
702
|
+
##% executable_real?() -> Boolean
|
703
|
+
def executable_real?() BOOLEAN end
|
704
|
+
##% file?() -> Boolean
|
705
|
+
def file?() BOOLEAN end
|
706
|
+
##% ftype() -> String
|
707
|
+
def ftype() '' end
|
708
|
+
##% gid() -> Integer
|
709
|
+
def gid() 0 end
|
710
|
+
##% grpowned?() -> Boolean
|
711
|
+
def grpowned?() BOOLEAN end
|
712
|
+
##% ino() -> Integer
|
713
|
+
def ino() 0 end
|
714
|
+
##% mode() -> Integer
|
715
|
+
def mode() 0 end
|
716
|
+
##% mtime() -> Time
|
717
|
+
def mtime() Time.new end
|
718
|
+
##% nlink() -> Integer
|
719
|
+
def nlink() 0 end
|
720
|
+
##% owned?() -> Boolean
|
721
|
+
def owned?() BOOLEAN end
|
722
|
+
##% pipe?() -> Boolean
|
723
|
+
def pipe?() BOOLEAN end
|
724
|
+
##% rdev() -> Integer
|
725
|
+
def rdev() 0 end
|
726
|
+
##% rdev_major() -> Integer
|
727
|
+
def rdev_major() 0 end
|
728
|
+
##% rdev_minor() -> Integer
|
729
|
+
def rdev_minor() 0 end
|
730
|
+
##% readable?() -> Boolean
|
731
|
+
def readable?() BOOLEAN end
|
732
|
+
##% readable_real?() -> Boolean
|
733
|
+
def readable_real?() BOOLEAN end
|
734
|
+
##% setgid?() -> Boolean
|
735
|
+
def setgid?() BOOLEAN end
|
736
|
+
##% setuid?() -> Boolean
|
737
|
+
def setuid?() BOOLEAN end
|
738
|
+
##% size() -> Integer
|
739
|
+
def size() 0 end
|
740
|
+
##% size?() -> Integer or nil
|
741
|
+
def size?() 0 || nil end
|
742
|
+
##% socket?() -> Boolean
|
743
|
+
def socket?() BOOLEAN end
|
744
|
+
##% sticky?() -> Boolean
|
745
|
+
def sticky?() BOOLEAN end
|
746
|
+
##% symlink?() -> FalseClass
|
747
|
+
def symlink?() false end
|
748
|
+
##% uid() -> Integer
|
749
|
+
def uid() 0 end
|
750
|
+
##% writable?() -> Boolean
|
751
|
+
def writable?() BOOLEAN end
|
752
|
+
##% writable_real?() -> Boolean
|
753
|
+
def writable_real?() BOOLEAN end
|
754
|
+
##% zero?() -> Boolean
|
755
|
+
def zero?() BOOLEAN end
|
756
|
+
end
|
757
|
+
|
758
|
+
module FileTest
|
759
|
+
##% self.blockdev?(String or IO) -> Boolean
|
760
|
+
def self.blockdev?(path) BOOLEAN end
|
761
|
+
##% self.chardev?(String or IO) -> Boolean
|
762
|
+
def self.chardev?(path) BOOLEAN end
|
763
|
+
##% self.directory?(String or IO) -> Boolean
|
764
|
+
def self.directory?(path) BOOLEAN end
|
765
|
+
##% self.executable?(String or IO) ->Boolean
|
766
|
+
def self.executable?(path) BOOLEAN end
|
767
|
+
##% self.executable_real?(String or IO) ->Boolean
|
768
|
+
def self.executable_real?(path) BOOLEAN end
|
769
|
+
##% self.exist?(String or IO) -> Boolean
|
770
|
+
def self.exist?(path) BOOLEAN end
|
771
|
+
##% self.exists?(String or IO) -> Boolean
|
772
|
+
def self.exists?(path) BOOLEAN end
|
773
|
+
##% self.file?(String or IO) -> Boolean
|
774
|
+
def self.file?(path) BOOLEAN end
|
775
|
+
##% self.grpowned?(String or IO) -> Boolean
|
776
|
+
def self.grpowned?(filename) BOOLEAN end
|
777
|
+
##% self.identical?(String or IO, String or IO) -> Boolean
|
778
|
+
def self.identical?(filename1, filename2) BOOLEAN end
|
779
|
+
##% self.owned?(String or IO) -> Boolean
|
780
|
+
def self.owned?(path) BOOLEAN end ##% self.setgid?(String or IO) -> Boolean
|
781
|
+
##% self.setgid?(String or IO) -> Boolean
|
782
|
+
def self.setgid?(path) BOOLEAN end
|
783
|
+
##% self.setuid?(String or IO) -> Boolean
|
784
|
+
def self.setuid?(path) BOOLEAN end
|
785
|
+
##% self.size(String or IO) -> Integer
|
786
|
+
def self.size(path) 0 end
|
787
|
+
##% self.size?(String or IO) -> Boolean
|
788
|
+
def self.size?(path) BOOLEAN end
|
789
|
+
##% self.socket?(String or IO) -> Boolean
|
790
|
+
def self.socket?(path) BOOLEAN end
|
791
|
+
##% self.sticky?(String or IO) -> Boolean
|
792
|
+
def self.sticky?(path) BOOLEAN end
|
793
|
+
##% self.writable?(String or IO) -> Boolean
|
794
|
+
def self.writable?(path) BOOLEAN end
|
795
|
+
##% self.writable_real?(String or IO) -> Boolean
|
796
|
+
def self.writable_real?(path) BOOLEAN end
|
797
|
+
##% self.zero?(String or IO) -> Boolean
|
798
|
+
def self.zero?(path) BOOLEAN end
|
799
|
+
end
|
800
|
+
|
801
|
+
class Fixnum
|
802
|
+
### Numeric
|
803
|
+
##% +@() -> self
|
804
|
+
def +@() self end
|
805
|
+
##% -@() -> Fixnum
|
806
|
+
def -@() 0 end
|
807
|
+
##% "<=>"(other) -> Fixnum
|
808
|
+
def <=>(other) 0 end
|
809
|
+
##% abs() -> Fixnum
|
810
|
+
def abs() self end
|
811
|
+
##% ceil() -> Fixnum
|
812
|
+
def ceil() 0 end
|
813
|
+
##% clone() -> self
|
814
|
+
def clone() self end
|
815
|
+
alias :dup :clone
|
816
|
+
##% coerce(Float) -> (Float, Float)
|
817
|
+
##% coerce(Numeric) -> (Fixnum, Fixnum)
|
818
|
+
def coerce(other) [0.0, 0.0] end
|
819
|
+
##% div(Numeric) -> Fixnum
|
820
|
+
def div(other) 0 end
|
821
|
+
##% divmod(Numeric) -> (Fixnum, Numeric)
|
822
|
+
def divmod(other) [0, 0] end
|
823
|
+
##% eql?(Numeric) -> Boolean
|
824
|
+
def eql?(other) BOOLEAN end
|
825
|
+
##% quo(Numeric) -> Float
|
826
|
+
def quo(other) 0.0 end
|
827
|
+
##% fdiv(Numeric) -> Float
|
828
|
+
def fdiv(other) 0.0 end
|
829
|
+
##% floor() -> Fixnum
|
830
|
+
def floor() 0 end
|
831
|
+
##% integer?() -> Boolean
|
832
|
+
def integer?() BOOLEAN end
|
833
|
+
##% modulo(Numeric) -> Fixnum
|
834
|
+
def modulo(other) 0 end
|
835
|
+
##% nonzero?() -> self
|
836
|
+
def nonzero?() self end
|
837
|
+
##% remainder(Numeric) -> Fixnum
|
838
|
+
def remainder(other) 0 end
|
839
|
+
##% round() -> Fixnum
|
840
|
+
def round() 0 end
|
841
|
+
##% step<a | a <= Numeric>(Numeric, ?a) {self or a or Fixnum -> ?} -> self
|
842
|
+
##% step<a | a <= Numeric>(Numeric, ?a) -> Enumerator<self, self or a or Fixnum>
|
843
|
+
def step(limit, step = 1) self end
|
844
|
+
##% to_int() -> Fixnum
|
845
|
+
def to_int() 0 end
|
846
|
+
##% truncate() -> Fixnum
|
847
|
+
def truncate() 0 end
|
848
|
+
##% zero?() -> Boolean
|
849
|
+
def zero?() BOOLEAN end
|
850
|
+
|
851
|
+
### Fixnum
|
852
|
+
##% id2name() -> String
|
853
|
+
def id2name() '' end
|
854
|
+
##% to_sym() -> Symbol
|
855
|
+
def to_sym() :a end
|
856
|
+
end
|
857
|
+
|
858
|
+
class Float
|
859
|
+
DIG = 0
|
860
|
+
EPSILONG = 0.0
|
861
|
+
MANT_DIG = 0
|
862
|
+
MAX = 0.0
|
863
|
+
MAX_10_EXP = 0
|
864
|
+
MAX_EXP = 0
|
865
|
+
MIN = 0.0
|
866
|
+
MIN_10_EXP = 0
|
867
|
+
MIN_EXP = 0
|
868
|
+
RADIX = 0
|
869
|
+
ROUNDS = 0
|
870
|
+
|
871
|
+
include Precision
|
872
|
+
|
873
|
+
### Precision
|
874
|
+
##% self.induced_from(a) -> Float
|
875
|
+
def self.induced_from(number) 0.0 end
|
876
|
+
##% prec(Class) -> Float
|
877
|
+
def prec(klass) 0.0 end
|
878
|
+
|
879
|
+
### Numeric
|
880
|
+
##% +@() -> self
|
881
|
+
def +@() self end
|
882
|
+
##% -@() -> Float
|
883
|
+
def -@() 0 end
|
884
|
+
##% "<=>"(other) -> Fixnum
|
885
|
+
def <=>(other) 0 end
|
886
|
+
##% abs() -> Float
|
887
|
+
def abs() self end
|
888
|
+
##% ceil() -> Integer
|
889
|
+
def ceil() 0 end
|
890
|
+
##% clone() -> self
|
891
|
+
def clone() self end
|
892
|
+
alias :dup :clone
|
893
|
+
##% coerce(Numeric) -> (Float, Float)
|
894
|
+
def coerce(other) [0.0, 0.0] end
|
895
|
+
##% div(Numeric) -> Float
|
896
|
+
def div(other) 0.0 end
|
897
|
+
##% divmod(Numeric) -> (Float, Numeric)
|
898
|
+
def divmod(other) [0, 0] end
|
899
|
+
##% eql?(Numeric) -> Boolean
|
900
|
+
def eql?(other) BOOLEAN end
|
901
|
+
##% quo(Numeric) -> Float
|
902
|
+
def quo(other) 0.0 end
|
903
|
+
##% fdiv(Numeric) -> Float
|
904
|
+
def fdiv(other) 0.0 end
|
905
|
+
##% floor() -> Integer
|
906
|
+
def floor() 0 end
|
907
|
+
##% integer?() -> Boolean
|
908
|
+
def integer?() BOOLEAN end
|
909
|
+
##% modulo(Numeric) -> Float
|
910
|
+
def modulo(other) 0.0 end
|
911
|
+
##% nonzero?() -> self
|
912
|
+
def nonzero?() self end
|
913
|
+
##% remainder(Numeric) -> Float
|
914
|
+
def remainder(other) 0.0 end
|
915
|
+
##% round() -> Fixnum
|
916
|
+
def round() 0 end
|
917
|
+
##% step<a | a <= Numeric>(Numeric, ?a) {self or a or Fixnum -> ?} -> self
|
918
|
+
##% step<a | a <= Numeric>(Numeric, ?a) -> Enumerator<self, self or a or Fixnum>
|
919
|
+
def step(limit, step = 1) self end
|
920
|
+
##% to_int() -> Integer
|
921
|
+
def to_int() 0 end
|
922
|
+
##% truncate() -> Integer
|
923
|
+
def truncate() 0 end
|
924
|
+
##% zero?() -> Boolean
|
925
|
+
def zero?() BOOLEAN end
|
926
|
+
|
927
|
+
### Integer
|
928
|
+
##% %(Numeric) -> Float
|
929
|
+
def %(other) 0.0 end
|
930
|
+
##% "*"(Numeric) -> Float
|
931
|
+
def *(other) 0.0 end
|
932
|
+
##% "**"(Numeric) -> Float
|
933
|
+
def **(other) 0.0 end
|
934
|
+
##% +(Numeric) -> Float
|
935
|
+
def +(other) 0.0 end
|
936
|
+
##% -(Numeric) -> Float
|
937
|
+
def -(other) 0.0 end
|
938
|
+
##% /(Numeric) -> Float
|
939
|
+
def /(other) 0.0 end
|
940
|
+
##% finite?() -> Boolean
|
941
|
+
def finite?() BOOLEAN end
|
942
|
+
##% hash() -> Fixnum
|
943
|
+
def hash() 0 end
|
944
|
+
##% infinite?() -> Fixnum
|
945
|
+
def infinite?() 0 end
|
946
|
+
##% nan?() -> Boolean
|
947
|
+
def nan?() BOOLEAN end
|
948
|
+
##% to_f() -> self
|
949
|
+
def to_f() self end
|
950
|
+
end
|
951
|
+
|
952
|
+
module GC
|
953
|
+
##% self.disable() -> Boolean
|
954
|
+
def disable() BOOLEAN end
|
955
|
+
##% self.enable() -> Boolean
|
956
|
+
def enable() BOOLEAN end
|
957
|
+
##% start() -> nil
|
958
|
+
def start() end
|
959
|
+
##% stress() -> Boolean
|
960
|
+
def stress() BOOLEAN end
|
961
|
+
##% stress=(Boolean) -> nil
|
962
|
+
def stress=(value) end
|
963
|
+
|
964
|
+
##% garbase_collect() -> nil
|
965
|
+
def garbase_collect() end
|
966
|
+
end
|
967
|
+
|
968
|
+
##% Hash<k, v, z | (k, v) <= t>
|
969
|
+
class Hash
|
970
|
+
include Enumerable
|
971
|
+
|
972
|
+
# FIXME
|
973
|
+
##% self.[](Hash<k', v', z'>) -> Hash<k', v', z'>
|
974
|
+
##% self.[](?k1, ?v1, ?k2, ?v2, ?k3, ?v3, ?k4, ?v4, ?k5, ?v5) -> Hash<k1 or k2 or k3 or k4 or k5, v1 or v2 or v3 or v4 or v5>
|
975
|
+
def self.[](*) {} end
|
976
|
+
# FIXME
|
977
|
+
##% self.new(?z') -> Hash<?, ?, z'>
|
978
|
+
##% self.new() {(k', v') -> ?} -> Hash<?, ?, ?>
|
979
|
+
def self.new(*) {} end
|
980
|
+
|
981
|
+
##% ==(a) -> Boolean
|
982
|
+
def ==(other) BOOLEAN end
|
983
|
+
##% ===(a) -> Boolean
|
984
|
+
def ===(other) BOOLEAN end
|
985
|
+
##% eql?(a) -> Boolean
|
986
|
+
def eql?(other) BOOLEAN end
|
987
|
+
##% [](a) -> v
|
988
|
+
def [](key) _v end
|
989
|
+
##% []=<v' | v' <= v>(k, v') -> v'
|
990
|
+
def []=(key, value) value end
|
991
|
+
##% store(k, v) -> v
|
992
|
+
def store(key, value) value end
|
993
|
+
# FIXME
|
994
|
+
def clear() self end
|
995
|
+
# FIXME
|
996
|
+
##% clone() -> Hash<k, v, z>
|
997
|
+
def clone() self end
|
998
|
+
alias :dup :clone
|
999
|
+
##% default(?a) -> d or a
|
1000
|
+
def default(key = nil) end
|
1001
|
+
##% default=<d | d <= z>(d) -> d
|
1002
|
+
def default=(value) value end
|
1003
|
+
# FIXME
|
1004
|
+
def default_proc() end
|
1005
|
+
##% delete(a) -> v
|
1006
|
+
##% delete(a) {a -> b} -> b
|
1007
|
+
def delete(key) _v end
|
1008
|
+
##% delete_if() -> Enumerator<self, (k, v)>
|
1009
|
+
##% delete_if() {(k, v) -> ?} -> self
|
1010
|
+
def delete_if() self end
|
1011
|
+
alias :reject! :delete_if
|
1012
|
+
##% each() {(k, v) -> ?} -> self
|
1013
|
+
##% each() -> Enumerator<self, (k, v)>
|
1014
|
+
def each() yield _k, _v; self end
|
1015
|
+
alias :each_pair :each
|
1016
|
+
##% each_key() {k -> ?} -> self
|
1017
|
+
##% each_key() -> Enumerator<self, k>
|
1018
|
+
def each_key() yield _k; self end
|
1019
|
+
##% each_value() {v -> ?} -> self
|
1020
|
+
##% each_value() -> Enumerator<self, v>
|
1021
|
+
def each_value() yield _v; self end
|
1022
|
+
##% empty?() -> Boolean
|
1023
|
+
def empty?() BOOLEAN end
|
1024
|
+
##% equal?(a) -> Boolean
|
1025
|
+
def equal?(other) BOOLEAN end
|
1026
|
+
##% fetch(a, ?b) -> v or b
|
1027
|
+
##% fetch(a) {a -> b} -> v or b
|
1028
|
+
def fetch(key) _v end
|
1029
|
+
##% has_key?(a) -> Boolean
|
1030
|
+
def has_key(key) BOOLEAN end
|
1031
|
+
alias :include? :has_key?
|
1032
|
+
alias :key? :has_key?
|
1033
|
+
alias :member? :has_key?
|
1034
|
+
##% has_value?(a) -> Boolean
|
1035
|
+
def has_value?(value) BOOLEAN end
|
1036
|
+
alias :value? :has_value?
|
1037
|
+
##% hash() -> Integer
|
1038
|
+
def hash() 0 end
|
1039
|
+
##% index(a) -> k
|
1040
|
+
def index(val) _k end
|
1041
|
+
##% indexes(*a) -> Array<v>
|
1042
|
+
def indexes(*index) [_v] end
|
1043
|
+
alias :indices :indexes
|
1044
|
+
##% to_s() -> String
|
1045
|
+
def to_s() '' end
|
1046
|
+
##% inspect() -> String
|
1047
|
+
def inspect() '' end
|
1048
|
+
##% invert() -> Hash<v, k>
|
1049
|
+
def invert() {_v => _k} end
|
1050
|
+
##% keys() -> Array<k>
|
1051
|
+
def keys() [_k] end
|
1052
|
+
##% length() -> Integer
|
1053
|
+
def length() 0 end
|
1054
|
+
alias :size :length
|
1055
|
+
##% merge<a | a <= Hash<k', v', z'> >(a) -> Hash<k or k', v or v', z or z'>
|
1056
|
+
##% merge<a | a <= Hash<k', v', z'> >(a) {(k, v, v') -> v''} -> Hash<k or k', v'', z or z'>
|
1057
|
+
def merge(other) self end
|
1058
|
+
##% merge!<a | a <= Hash<k, v, z> >(a) -> self
|
1059
|
+
##% merge!<a | a <= Hash<k, v', z>, v'' <= v>(a) {(k, v, v') -> v''} -> self
|
1060
|
+
def merge!(other) self end
|
1061
|
+
##% rehash() -> self
|
1062
|
+
def rehash() self end
|
1063
|
+
##% reject() {(k, v) -> ?} -> Hash<k, v>
|
1064
|
+
##% reject() -> Enumerator<Hash<k, v>, (k, v)> >
|
1065
|
+
def reject() self end
|
1066
|
+
##% replace<a | a <= Hash<k, v, z> >(a) -> self
|
1067
|
+
def replace(other) self end
|
1068
|
+
##% select() -> Enumerator<Array<(k, v)>, (k, v)>
|
1069
|
+
##% select() {(k, v) -> ?} -> Array<(k, v)>
|
1070
|
+
def select() yield _k, _v; [_k, _v] end
|
1071
|
+
##% shift() -> (k, v) or z
|
1072
|
+
def shift() [_k, _v] end
|
1073
|
+
##% sort() -> Array<(k, v)>
|
1074
|
+
##% sort() {(k, v) -> ?} -> Array<k, v>
|
1075
|
+
def sort() [[_k, _v]] end
|
1076
|
+
##% to_a() -> Array<(k, v)>
|
1077
|
+
def to_a() [[_k, _v]] end
|
1078
|
+
##% to_hash() -> self
|
1079
|
+
def to_hash() self end
|
1080
|
+
##% update<a | a <= Hash<k, v, z> >(a) -> self
|
1081
|
+
##% update<a | a <= Hash<k, v', z>, v'' <= v>(a) {(k, v, v') -> v''} -> self
|
1082
|
+
def update(other) self end
|
1083
|
+
##% values() -> Array<v>
|
1084
|
+
def values() [_v] end
|
1085
|
+
##% values_at(*a) -> Array<v or z>
|
1086
|
+
def values_at(*key) [_v] end
|
1087
|
+
|
1088
|
+
private
|
1089
|
+
# Special methods for internal use
|
1090
|
+
##% _k() -> k
|
1091
|
+
def _k() end
|
1092
|
+
##% _v() -> v
|
1093
|
+
def _v() end
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
##% IO<| t <= String>
|
1097
|
+
class IO
|
1098
|
+
SEEK_CUR = 0
|
1099
|
+
SEEK_END = 0
|
1100
|
+
SEEK_SET = 0
|
1101
|
+
|
1102
|
+
include Enumerable
|
1103
|
+
|
1104
|
+
##% self.new(Integer, ?a) -> IO
|
1105
|
+
def self.new(fd, mode = 'r') IO.new(0) end
|
1106
|
+
##% self.for_fd(Integer, ?a) -> IO
|
1107
|
+
def self.for_fd(fd, mode = 'r') IO.new(0) end
|
1108
|
+
##% self.open(Integer, ?a) -> IO
|
1109
|
+
##% self.open(Integer, ?a) {IO -> b} -> b
|
1110
|
+
def self.open(fd, mode = 'r') IO.new(0) end
|
1111
|
+
##% self.foreach(String, ?String) {String -> ?} -> nil
|
1112
|
+
##% self.foreach(String, ?String) -> Enumerator<nil, String>
|
1113
|
+
def self.foreach(path, rs = $/) yield ''; nil end
|
1114
|
+
##% self.pipe() -> (IO, IO)
|
1115
|
+
def self.pipe() [IO.new(0), IO.new(0)] end
|
1116
|
+
##% self.popen(String, ?a) -> IO
|
1117
|
+
##% self.popen(String, ?a) {IO -> b} -> b
|
1118
|
+
def self.popen(command, mode = 'r') IO.new(0) end
|
1119
|
+
##% self.read(String, ?Integer, ?Integer) -> String
|
1120
|
+
def self.read(path, length = nil, offset = 0) '' end
|
1121
|
+
##% self.readlines(String, ?String) -> Array<String>
|
1122
|
+
def self.readlines(path, rs = $/) [''] end
|
1123
|
+
##% self.select(Array<IO>, ?Array<IO>, ?Array<IO>, ?Integer) -> (Array<IO>, Array<IO>, Array<IO>)
|
1124
|
+
def self.select(reads, writes = [], excepts = [], timeout = nil) [[IO.new(0)], [IO.new(0)], [IO.new(0)]] end
|
1125
|
+
##% self.sysopen(String, ?a, ?Integer) -> Integer
|
1126
|
+
def self.sysopen(path, mode = 'r', perm = 0666) 0 end
|
1127
|
+
|
1128
|
+
# FIXME to_s
|
1129
|
+
##% "<<"(a) -> self
|
1130
|
+
def <<(object) self end
|
1131
|
+
##% binmode() -> self
|
1132
|
+
def binmode() self end
|
1133
|
+
##% bytes() -> Enumerator<self, Fixnum>
|
1134
|
+
def bytes() Enumerator.new end
|
1135
|
+
##% each_char() {Fixnum -> ?} -> self
|
1136
|
+
##% each_char() -> Enumerator<self, Fixnum>
|
1137
|
+
def each_char() yield 0; self end
|
1138
|
+
alias :chars :each_char
|
1139
|
+
##% clone() -> IO
|
1140
|
+
def clone() self end
|
1141
|
+
alias :dup :clone
|
1142
|
+
##% close() -> nil
|
1143
|
+
def close() end
|
1144
|
+
##% close_read() -> nil
|
1145
|
+
def close_read() end
|
1146
|
+
##% close_write() -> nil
|
1147
|
+
def close_write() end
|
1148
|
+
##% closed?() -> Boolean
|
1149
|
+
def closed?() BOOLEAN end
|
1150
|
+
##% each(?String) {String -> ?} -> self
|
1151
|
+
##% each(?String) -> Enumerator<self, String>
|
1152
|
+
def each(rs = $/) yield ''; self end
|
1153
|
+
alias :each_line :each
|
1154
|
+
##% each_byte() {Fixnum -> ?} -> self
|
1155
|
+
##% each_byte() -> Enumerator<self, Fixnum>
|
1156
|
+
def each_byte() yield 0; self end
|
1157
|
+
##% eof() -> Boolean
|
1158
|
+
def eof() BOOLEAN end
|
1159
|
+
alias :eof? :eof
|
1160
|
+
##% fcntl(Integer, ?(Integer or String or Boolean)) -> Integer
|
1161
|
+
def fcntl(cmd, arg = 0) 0 end
|
1162
|
+
##% fileno() -> Integer
|
1163
|
+
def fileno() 0 end
|
1164
|
+
alias :to_i :fileno
|
1165
|
+
##% flush() -> self
|
1166
|
+
def flush() self end
|
1167
|
+
##% fsync() -> Integer
|
1168
|
+
def fsync() 0 end
|
1169
|
+
##% getbyte() -> Fixnum
|
1170
|
+
def getbyte() 0 end
|
1171
|
+
##% getc() -> Fixnum
|
1172
|
+
def getc() 0 end
|
1173
|
+
##% gets(?String) -> String
|
1174
|
+
def gets(rs = $/) '' end
|
1175
|
+
##% ioctl(Integer, ?(Integer or String or Boolean)) -> Integer
|
1176
|
+
def ioctl(cmd, arg = 0) 0 end
|
1177
|
+
##% isatty() -> Boolean
|
1178
|
+
def isatty() BOOLEAN end
|
1179
|
+
alias :tty? :isatty
|
1180
|
+
##% lineno() -> Integer
|
1181
|
+
def lineno() 0 end
|
1182
|
+
##% lineno=(Integer) -> nil
|
1183
|
+
def lineno=(number) end
|
1184
|
+
##% lines(?String) -> Enumerator<self, String>
|
1185
|
+
def lines(rs = $/) Enumerator.new end
|
1186
|
+
##% pid() -> Integer
|
1187
|
+
def pid() 0 end
|
1188
|
+
##% pos() -> Integer
|
1189
|
+
alias :tell :pos
|
1190
|
+
##% pos=(Integer) -> Integer
|
1191
|
+
def pos=(n) end
|
1192
|
+
##% print(*a) -> nil
|
1193
|
+
def print(*arg) end
|
1194
|
+
##% printf(String, *a) -> nil
|
1195
|
+
def printf(format, *arg) end
|
1196
|
+
##% putc<c | c <= Integer>(c) -> c
|
1197
|
+
def putc(ch) ch end
|
1198
|
+
##% puts(*a) -> nil
|
1199
|
+
def puts(*obj) end
|
1200
|
+
##% read(?Integer, ?String) -> String
|
1201
|
+
def read(length = nil, outbuf = '') '' end
|
1202
|
+
##% read_nonblock(Integer, ?String) -> String
|
1203
|
+
def read_nonblock(maxlen, outbuf = '') '' end
|
1204
|
+
##% readbyte() -> Fixnum
|
1205
|
+
def readbyte() 0 end
|
1206
|
+
##% readchar() -> Fixnum
|
1207
|
+
def readchar() 0 end
|
1208
|
+
##% readline(?String) -> String
|
1209
|
+
def readline(rs = $/) '' end
|
1210
|
+
##% readlines(?String) -> Array<String>
|
1211
|
+
def readlines(rs = $/) [''] end
|
1212
|
+
##% readpartial(?Integer, ?String) -> String
|
1213
|
+
def readpartial(maxlen, outbuf = '') '' end
|
1214
|
+
##% reopen(IO) -> self
|
1215
|
+
##% reopen(String, ?a) -> self
|
1216
|
+
def reopen(*) self end
|
1217
|
+
##% rewind() -> Integer
|
1218
|
+
def rewind() 0 end
|
1219
|
+
##% seek(Integer, ?Fixnum) -> Fixnum
|
1220
|
+
def seek(offset, whence = IO::SEEK_SET) 0 end
|
1221
|
+
##% stat() -> File::Stat
|
1222
|
+
def stat() File::Stat.new('') end
|
1223
|
+
##% sync() -> Boolean
|
1224
|
+
def sync() BOOLEAN end
|
1225
|
+
##% sync=(Boolean) -> Boolean
|
1226
|
+
def sync=(newstate) newstate end
|
1227
|
+
##% sysread(Integer, ?String) -> String
|
1228
|
+
def sysread(maxlen, outbuf = '') '' end
|
1229
|
+
##% sysseek(Integer, ?Fixnum) -> Fixnum
|
1230
|
+
def sysseek(offset, whence = IO::SEEK_SET) 0 end
|
1231
|
+
# FIXME to_s
|
1232
|
+
##% syswrite(a) -> Integer
|
1233
|
+
def syswrite(string) 0 end
|
1234
|
+
##% to_io() -> self
|
1235
|
+
def to_io() self end
|
1236
|
+
##% ungetc(a) -> nil
|
1237
|
+
def ungetc(char) end
|
1238
|
+
# FIXME to_s
|
1239
|
+
##% write(a) -> Integer
|
1240
|
+
def write(str) 0 end
|
1241
|
+
# FIXME to_s
|
1242
|
+
##% write_nonblock(a) -> Integer
|
1243
|
+
def write_nonblock(str) 0 end
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
class Integer
|
1247
|
+
include Precision
|
1248
|
+
|
1249
|
+
### Precision
|
1250
|
+
##% self.induced_from(a) -> Fixnum
|
1251
|
+
def self.induced_from(number) 0 end
|
1252
|
+
##% prec(Class) -> Fixnum
|
1253
|
+
def prec(klass) 0 end
|
1254
|
+
|
1255
|
+
### Numeric
|
1256
|
+
##% +@() -> self
|
1257
|
+
def +@() self end
|
1258
|
+
##% -@() -> Integer
|
1259
|
+
def -@() 0 end
|
1260
|
+
##% "<=>"(other) -> Fixnum
|
1261
|
+
def <=>(other) 0 end
|
1262
|
+
##% abs() -> Integer
|
1263
|
+
def abs() self end
|
1264
|
+
##% ceil() -> Integer
|
1265
|
+
def ceil() 0 end
|
1266
|
+
##% clone() -> self
|
1267
|
+
def clone() self end
|
1268
|
+
alias :dup :clone
|
1269
|
+
##% coerce(Float) -> (Float, Float)
|
1270
|
+
##% coerce(Numeric) -> (Integer, Integer)
|
1271
|
+
def coerce(other) [0.0, 0.0] end
|
1272
|
+
##% div(Numeric) -> Integer
|
1273
|
+
def div(other) 0 end
|
1274
|
+
##% divmod(Numeric) -> (Integer, Integer)
|
1275
|
+
def divmod(other) [0, 0] end
|
1276
|
+
##% eql?(Numeric) -> Boolean
|
1277
|
+
def eql?(other) BOOLEAN end
|
1278
|
+
##% quo(Numeric) -> Float
|
1279
|
+
def quo(other) 0.0 end
|
1280
|
+
##% fdiv(Numeric) -> Float
|
1281
|
+
def fdiv(other) 0.0 end
|
1282
|
+
##% floor() -> Integer
|
1283
|
+
def floor() 0 end
|
1284
|
+
##% integer?() -> Boolean
|
1285
|
+
def integer?() BOOLEAN end
|
1286
|
+
##% modulo(Numeric) -> Integer
|
1287
|
+
def modulo(other) 0 end
|
1288
|
+
##% nonzero?() -> self
|
1289
|
+
def nonzero?() self end
|
1290
|
+
##% remainder(Numeric) -> Integer
|
1291
|
+
def remainder(other) 0 end
|
1292
|
+
##% round() -> Integer
|
1293
|
+
def round() 0 end
|
1294
|
+
##% step<a | a <= Numeric>(Numeric, ?a) {self or a or Fixnum -> ?} -> self
|
1295
|
+
##% step<a | a <= Numeric>(Numeric, ?a) -> Enumerable::Enumerator<self, self or a or Fixnum>
|
1296
|
+
def step(limit, step = 1) self end
|
1297
|
+
##% to_int() -> Integer
|
1298
|
+
def to_int() 0 end
|
1299
|
+
##% truncate() -> Integer
|
1300
|
+
def truncate() 0 end
|
1301
|
+
##% zero?() -> Boolean
|
1302
|
+
def zero?() BOOLEAN end
|
1303
|
+
|
1304
|
+
### Integer
|
1305
|
+
##% %(Numeric) -> Fixnum or Bignum
|
1306
|
+
def %(other) 0 end
|
1307
|
+
##% &(Numeric) -> Fixnum or Bignum
|
1308
|
+
def &(other) 0 end
|
1309
|
+
##% "*"(Float) -> Float
|
1310
|
+
##% "*"(Integer) -> Fixnum or Bignum
|
1311
|
+
def *(other) 0 end
|
1312
|
+
##% "**"(Float) -> Float
|
1313
|
+
##% "**"(Integer) -> Fixnum or Bignum
|
1314
|
+
def **(other) 0 end
|
1315
|
+
##% +(Float) -> Float
|
1316
|
+
##% +(Integer) -> Fixnum or Bignum
|
1317
|
+
def +(other) 0 end
|
1318
|
+
##% -(Float) -> Float
|
1319
|
+
##% -(Integer) -> Fixnum or Bignum
|
1320
|
+
def -(other) 0 end
|
1321
|
+
##% /(Float) -> Float
|
1322
|
+
##% /(Integer) -> Fixnum or Bignum
|
1323
|
+
def /(other) 0 end
|
1324
|
+
##% ">>"(Integer) -> Fixnum or Bignum
|
1325
|
+
def >>(bits) 0 end
|
1326
|
+
##% [](Integer) -> Fixnum
|
1327
|
+
def [](nth) 0 end
|
1328
|
+
##% ^(Integer) -> Fixnum or Bignum
|
1329
|
+
def ^(other) 0 end
|
1330
|
+
##% chr() -> String
|
1331
|
+
def chr() '' end
|
1332
|
+
##% downto(Numeric) {self -> ?} -> self
|
1333
|
+
##% downto(Numeric) -> Enumerator<self, self>
|
1334
|
+
def downto(limit, step = 1) self end
|
1335
|
+
##% even?() -> Boolean
|
1336
|
+
def even?() BOOLEAN end
|
1337
|
+
##% integer?() -> TrueClass
|
1338
|
+
def integer?() true end
|
1339
|
+
##% next() -> Fixnum or Bignum
|
1340
|
+
def next() 0 end
|
1341
|
+
alias :succ :next
|
1342
|
+
##% odd?() -> Boolean
|
1343
|
+
def odd?() BOOLEAN end
|
1344
|
+
##% ord() -> self
|
1345
|
+
def ord() self end
|
1346
|
+
##% pred() -> Fixnum or Bignum
|
1347
|
+
def pred() 0 end
|
1348
|
+
##% size() -> Fixnum
|
1349
|
+
def size() 0 end
|
1350
|
+
##% times() {self -> ?} -> self
|
1351
|
+
##% times() -> Enumerator<self, self>
|
1352
|
+
def times() yield self end
|
1353
|
+
##% to_f() -> Float
|
1354
|
+
def to_f() 0.0 end
|
1355
|
+
##% to_i() -> self
|
1356
|
+
def to_i() self end
|
1357
|
+
alias :to_int :to_i
|
1358
|
+
##% to_s(?Integer) -> String
|
1359
|
+
def to_s(base = nil) '' end
|
1360
|
+
##% upto(Numeric) {self -> ?} -> self
|
1361
|
+
##% upto(Numeric) -> Enumerator<self, self>
|
1362
|
+
def upto(limit, step = 1) self end
|
1363
|
+
##% "|"(Numeric) -> Fixnum or Bignum
|
1364
|
+
def |(other) 0 end
|
1365
|
+
##% ~() -> Fixnum or Bignum
|
1366
|
+
def ~() 0 end
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
module Kernel
|
1370
|
+
private
|
1371
|
+
|
1372
|
+
### Constants
|
1373
|
+
ARGF = IO.new(0)
|
1374
|
+
ARGV = ['']
|
1375
|
+
DATA = File.new('')
|
1376
|
+
ENV = Hash['', '']
|
1377
|
+
FALSE = false
|
1378
|
+
NIL = nil
|
1379
|
+
PLATFORM = ''
|
1380
|
+
RELEASE_DATE = ''
|
1381
|
+
RUBY_COPYRIGHT = ''
|
1382
|
+
RUBY_DESCRIPTION = ''
|
1383
|
+
RUBY_PATCHLEVEL = 0
|
1384
|
+
RUBY_PLATFORM = ''
|
1385
|
+
RUBY_RELEASE_DATE = ''
|
1386
|
+
RUBY_VERSION = ''
|
1387
|
+
SCRIPT_LINES__ = {}
|
1388
|
+
STDERR = IO.new(0)
|
1389
|
+
STDIN = IO.new(0)
|
1390
|
+
STDOUT = IO.new(0)
|
1391
|
+
TOPLEVEL_BINDING = Binding.new
|
1392
|
+
TRUE = true
|
1393
|
+
VERSION = ''
|
1394
|
+
|
1395
|
+
### Global Variables
|
1396
|
+
$! = Exception.new
|
1397
|
+
$" = ['']
|
1398
|
+
$LOADED_FEATURES = $"
|
1399
|
+
$$ = 0
|
1400
|
+
#$& = ''
|
1401
|
+
#$' = ''
|
1402
|
+
$* = ['']
|
1403
|
+
#$+ = ''
|
1404
|
+
$, = ''
|
1405
|
+
$/ = ''
|
1406
|
+
$-0 = ''
|
1407
|
+
$; = // || ''
|
1408
|
+
$-F = $;
|
1409
|
+
$: = ['']
|
1410
|
+
$LOAD_PATH = $:
|
1411
|
+
$-I = $:
|
1412
|
+
$KCODE = ''
|
1413
|
+
$-K = ''
|
1414
|
+
$-a = BOOLEAN
|
1415
|
+
$DEBUG = BOOLEAN
|
1416
|
+
$-d = BOOLEAN
|
1417
|
+
$-i = BOOLEAN
|
1418
|
+
$-l = BOOLEAN
|
1419
|
+
$-p = BOOLEAN
|
1420
|
+
$VERBOSE = BOOLEAN
|
1421
|
+
$-v = BOOLEAN
|
1422
|
+
$-w = BOOLEAN
|
1423
|
+
$. = 0
|
1424
|
+
$0 = ''
|
1425
|
+
$PROGRAM_NAME = ''
|
1426
|
+
#$1 = ''
|
1427
|
+
#$2 = ''
|
1428
|
+
#$3 = ''
|
1429
|
+
#$4 = ''
|
1430
|
+
#$5 = ''
|
1431
|
+
#$6 = ''
|
1432
|
+
#$7 = ''
|
1433
|
+
#$8 = ''
|
1434
|
+
#$9 = ''
|
1435
|
+
#$10 = ''
|
1436
|
+
#$11 = ''
|
1437
|
+
$< = IO.new(0)
|
1438
|
+
$= = BOOLEAN
|
1439
|
+
$> = IO.new(0)
|
1440
|
+
$stdout = $>
|
1441
|
+
$defout = $stdout
|
1442
|
+
$? = Process::Status.new
|
1443
|
+
$@ = ['']
|
1444
|
+
$FILENAME = ''
|
1445
|
+
$SAFE = 0
|
1446
|
+
$\ = ''
|
1447
|
+
$_ = ''
|
1448
|
+
#$` = ''
|
1449
|
+
$stderr = IO.new(0)
|
1450
|
+
$deferr = $stderr
|
1451
|
+
$stdin = IO.new(0)
|
1452
|
+
$~ = MatchData
|
1453
|
+
|
1454
|
+
### Module Methods
|
1455
|
+
# FIXME to_ary
|
1456
|
+
##% Array<a | a <= Array>(a) -> a
|
1457
|
+
##% Array(a) -> a
|
1458
|
+
def Array(arg) [] end
|
1459
|
+
##% Float(a) -> Float
|
1460
|
+
def Float(arg) 0.0 end
|
1461
|
+
##% Integer(a) -> Integer
|
1462
|
+
def Integer(arg) 0 end
|
1463
|
+
##% String(a) -> String
|
1464
|
+
def String(arg) '' end
|
1465
|
+
##% __method__() -> Symbol
|
1466
|
+
def __method__() :a end
|
1467
|
+
##% `(command) -> String
|
1468
|
+
def `(command) '' end # `
|
1469
|
+
##% abort(?String) -> nil
|
1470
|
+
def abort(message = $!.message) end
|
1471
|
+
##% at_exit() {() -> ?} -> Proc
|
1472
|
+
def at_exit() Proc.new end
|
1473
|
+
##% autoload(String or Symbol, String) -> nil
|
1474
|
+
def autoload(const_name, feature) end
|
1475
|
+
##% autoload?(String or Symbol) -> String
|
1476
|
+
def autoload?(const_name) '' end
|
1477
|
+
##% binding() -> Binding
|
1478
|
+
def binding() Binding.new end
|
1479
|
+
##% block_given?() -> Boolean
|
1480
|
+
def block_given() BOOLEAN end
|
1481
|
+
alias :iterator? :block_given?
|
1482
|
+
# FIXME
|
1483
|
+
##% callcc() {Continuation -> ?} -> ?
|
1484
|
+
def callcc() end
|
1485
|
+
##% caller(?Integer) -> Array<String>
|
1486
|
+
def caller(level_num = 1) [''] end
|
1487
|
+
# FIXME
|
1488
|
+
##% catch(a) {a -> ?} -> ?
|
1489
|
+
def catch(tag) yield tag end
|
1490
|
+
##% chomp(?String) -> String
|
1491
|
+
def chomp(rs = $/) '' end
|
1492
|
+
##% chomp!(?String) -> String
|
1493
|
+
def chomp!(rs = $/) '' end
|
1494
|
+
##% chop() -> String
|
1495
|
+
def chop() '' end
|
1496
|
+
##% chop!() -> String
|
1497
|
+
def chop() '' end
|
1498
|
+
##% eval(String, ?Proc or Binding, ?String, ?Integer) -> ?
|
1499
|
+
def eval(expr, bind = nil, fname = __FILE__, lineno = 1) end
|
1500
|
+
##% exec(String) -> nil
|
1501
|
+
##% exec(String, *String) -> nil
|
1502
|
+
def exec(command) end
|
1503
|
+
##% exit(Integer or Boolean) -> nil
|
1504
|
+
def exit(status = true) end
|
1505
|
+
##% exit!(Integer or Boolean) -> nil
|
1506
|
+
def exit!(status = true) end
|
1507
|
+
# FIXME
|
1508
|
+
##% raise() -> nil
|
1509
|
+
##% raise(String) -> nil
|
1510
|
+
##% raise(?, ?String, Array<String>) -> nil
|
1511
|
+
def raise(*) end
|
1512
|
+
alias :fail :raise
|
1513
|
+
##% fork() -> Integer
|
1514
|
+
##% fork() {() -> ?} -> Integer
|
1515
|
+
def fork() yield end
|
1516
|
+
##% sprintf(String, *a) -> String
|
1517
|
+
def sprintf(format, *arg) '' end
|
1518
|
+
alias :format :sprintf
|
1519
|
+
##% getc() -> Fixnum
|
1520
|
+
def getc() 0 end
|
1521
|
+
##% gets(?String) -> String
|
1522
|
+
def gets(rs = $/) '' end
|
1523
|
+
##% global_variables() -> Array<String>
|
1524
|
+
def global_variables() [''] end
|
1525
|
+
##% gsub(String or Regexp, String) -> String
|
1526
|
+
##% gsub(String or Regexp) {String -> ?} -> String
|
1527
|
+
##% gsub(String or Regexp) -> Enumerator<String, String>
|
1528
|
+
def gsub(pattern, replace = nil) '' end
|
1529
|
+
##% gsub!(String or Regexp, String) -> self
|
1530
|
+
##% gsub!(String or Regexp) {String -> ?} -> self
|
1531
|
+
##% gsub!(String or Regexp) -> Enumerator<String, self>
|
1532
|
+
def gsub!(pattern, replace = nil) self end
|
1533
|
+
# skelton
|
1534
|
+
def proc() Proc.new end
|
1535
|
+
alias :lambda :proc
|
1536
|
+
##% load(String, ?Boolean) -> TrueClass
|
1537
|
+
def load(file, priv = false) true end
|
1538
|
+
##% local_varaibles() -> Array<String>
|
1539
|
+
def local_varaibles() [''] end
|
1540
|
+
##% loop() {() -> a} -> a
|
1541
|
+
def loop() yield end
|
1542
|
+
##% open(String or Integer, ?a, ?Integer) -> IO
|
1543
|
+
##% open(String or Integer, ?a, ?Integer) {IO -> ?} -> nil
|
1544
|
+
def open(name, mode = 'r', perm = nil) IO.new(0) end
|
1545
|
+
##% p(*a) -> nil
|
1546
|
+
def p(*arg) end
|
1547
|
+
##% print(*a) -> nil
|
1548
|
+
def p(*arg) end
|
1549
|
+
##% printf(String, *a) -> nil
|
1550
|
+
##% printf(IO, String, *a) -> nil
|
1551
|
+
def printf(*) end
|
1552
|
+
##% putc<a | a <= Integer or String>(a) -> a
|
1553
|
+
def putc(ch) ch end
|
1554
|
+
##% puts(*a) -> nil
|
1555
|
+
def puts(*arg) end
|
1556
|
+
##% rand(?Numeric) -> Integer or Float
|
1557
|
+
def rand(max = 0) 0 || 0.0 end
|
1558
|
+
##% readline(?String) -> String
|
1559
|
+
def readline(rs = $/) '' end
|
1560
|
+
##% readlines(?String) -> Array<String>
|
1561
|
+
def readlines(rs = $/) [''] end
|
1562
|
+
##% require(String) -> Boolean
|
1563
|
+
def require(feature) BOOLEAN end
|
1564
|
+
##% require_relative(String) -> Boolean
|
1565
|
+
def require_relative(feature) BOOLEAN end
|
1566
|
+
##% scan(String or Regexp) -> Array<String> or Array<Array<String> >
|
1567
|
+
##% scan(String or Regexp) {String -> ?} -> self
|
1568
|
+
def scan(re) [''] || [['']] end
|
1569
|
+
##% select(Array<IO>, ?Array<IO>, ?Array<IO>, ?Integer) -> (Array<IO>, Array<IO>, Array<IO>)
|
1570
|
+
def select(reads, writes = [], excepts = [], timeout = nil) [[IO.new(0)], [IO.new(0)], [IO.new(0)]] end
|
1571
|
+
def set_trace_func(*) end
|
1572
|
+
##% sleep(?Numeric) -> Integer
|
1573
|
+
def sleep(sec = 0) 0 end
|
1574
|
+
##% split(?(String or Regexp), ?Integer) -> Array<String> or Array<Array<String> >
|
1575
|
+
def split(sep = $;, limit = 0) [''] || [['']] end
|
1576
|
+
##% srand(?a) -> Integer
|
1577
|
+
def srand(seed = nil) 0 end
|
1578
|
+
##% sub(String or Regexp, String) -> String
|
1579
|
+
##% sub(String or Regexp) {String -> ?} -> String
|
1580
|
+
##% sub(String or Regexp) -> Enumerator<String, String>
|
1581
|
+
def sub(pattern, replace = nil) '' end
|
1582
|
+
##% sub!(String or Regexp, String) -> self
|
1583
|
+
##% sub!(String or Regexp) {String -> ?} -> self
|
1584
|
+
##% sub!(String or Regexp) -> Enumerator<String, self>
|
1585
|
+
def sub!(pattern, replace = nil) self end
|
1586
|
+
##% syscall(Integer, *(String or Integer)) -> Integer
|
1587
|
+
def syscall(num, *arg) 0 end
|
1588
|
+
##% system(String) -> Boolean
|
1589
|
+
##% system(String, *String) -> Boolean
|
1590
|
+
def system(*) BOOLEAN end
|
1591
|
+
##% test(String or Integer, File) -> Boolean or Time or Integer
|
1592
|
+
##% test(String or Integer, File, File) -> Boolean
|
1593
|
+
def test(cmd, file1, file2 = nil) BOOLEAN or Time.new or 0 end
|
1594
|
+
# FIXME
|
1595
|
+
##% throw(a, ?b) -> nil
|
1596
|
+
def throw(tag, value = nil) end
|
1597
|
+
def trace_var(*) end
|
1598
|
+
##% trap(String or Symbol or Integer, String or Process) -> ?
|
1599
|
+
##% trap(String or Symbol or Integer) {() -> ?} -> ?
|
1600
|
+
def trap(signal, command = nil) end
|
1601
|
+
def untrace_var(*) end
|
1602
|
+
##% warn(a) -> nil
|
1603
|
+
def warn(message) end
|
1604
|
+
end
|
1605
|
+
|
1606
|
+
module Marshal
|
1607
|
+
MAJOR_VERSION = 0
|
1608
|
+
MINOR_VERSION = 0
|
1609
|
+
|
1610
|
+
##% dump(Object, ?(IO or String), ?Integer) -> IO or String
|
1611
|
+
def dump(obj, port = '', limit = -1) IO.new(0) || '' end
|
1612
|
+
##% load(IO or String, ?Proc) -> Object
|
1613
|
+
def load(port, proc = nil) Object.new end
|
1614
|
+
end
|
1615
|
+
|
1616
|
+
class MatchData
|
1617
|
+
##% [](Integer) -> String
|
1618
|
+
##% [](Range) -> String
|
1619
|
+
##% [](Integer, Integer) -> Array<String>
|
1620
|
+
def [](*) '' end
|
1621
|
+
##% begin(Integer) -> Fixnum
|
1622
|
+
def begin(n) 0 end
|
1623
|
+
##% captures() -> Array<String>
|
1624
|
+
def captures() [''] end
|
1625
|
+
##% end(Integer) -> Fixnum
|
1626
|
+
def end(n) 0 end
|
1627
|
+
##% end(Integer) -> Fixnum
|
1628
|
+
def end(n) 0 end
|
1629
|
+
##% length() -> Fixnum
|
1630
|
+
def length() 0 end
|
1631
|
+
alias :size :length
|
1632
|
+
##% offset(Integer) -> Fixnum
|
1633
|
+
def offset(n) 0 end
|
1634
|
+
##% post_match() -> String
|
1635
|
+
def post_match() '' end
|
1636
|
+
##% pre_match() -> String
|
1637
|
+
def pre_match() '' end
|
1638
|
+
##% select() {Strign -> ?} -> Array<String>
|
1639
|
+
def select() yield ''; [''] end
|
1640
|
+
##% string() -> String
|
1641
|
+
def string() '' end
|
1642
|
+
##% to_a() -> Array<String>
|
1643
|
+
def to_a() [''] end
|
1644
|
+
##% to_s() -> String
|
1645
|
+
def to_s() '' end
|
1646
|
+
##% values_at(*Integer) -> Array<String>
|
1647
|
+
def values_at(*idnex) [''] end
|
1648
|
+
end
|
1649
|
+
|
1650
|
+
module Math
|
1651
|
+
E = 0.0
|
1652
|
+
PI = 0.0
|
1653
|
+
|
1654
|
+
module_function
|
1655
|
+
|
1656
|
+
##% acos(Integer or Float) -> Float
|
1657
|
+
def acos(x) 0.0 end
|
1658
|
+
##% acosh(Integer or Float) -> Float
|
1659
|
+
def acosh(x) 0.0 end
|
1660
|
+
##% asin(Integer or Float) -> Float
|
1661
|
+
def asin(x) 0.0 end
|
1662
|
+
##% asinh(Integer or Float) -> Float
|
1663
|
+
def asinh(x) 0.0 end
|
1664
|
+
##% atan(Integer or Float) -> Float
|
1665
|
+
def atan(x) 0.0 end
|
1666
|
+
##% atan2(Integer or Float) -> Float
|
1667
|
+
def atan2(x) 0.0 end
|
1668
|
+
##% atanh(Integer or Float) -> Float
|
1669
|
+
def atanh(x) 0.0 end
|
1670
|
+
##% cos(Integer or Float) -> Float
|
1671
|
+
def cos(x) 0.0 end
|
1672
|
+
##% cosh(Integer or Float) -> Float
|
1673
|
+
def cosh(x) 0.0 end
|
1674
|
+
##% erf(Integer or Float) -> Float
|
1675
|
+
def erf(x) 0.0 end
|
1676
|
+
##% erfc(Integer or Float) -> Float
|
1677
|
+
def erfc(x) 0.0 end
|
1678
|
+
##% exp(Integer or Float) -> Float
|
1679
|
+
def exp(x) 0.0 end
|
1680
|
+
##% frexp(Integer or Float) -> (Float, Fixnum)
|
1681
|
+
def frexp(x) [0.0, 0] end
|
1682
|
+
##% hypot(Integer or Float, Integer or Float) -> Float
|
1683
|
+
def hypot(x, y) 0.0 end
|
1684
|
+
##% ldexp(Integer or Float, Integer) -> Float
|
1685
|
+
def ldexp(x, exp) 0.0 end
|
1686
|
+
##% log(Integer or Float) -> Float
|
1687
|
+
def log(x) 0.0 end
|
1688
|
+
##% log10(Integer or Float) -> Float
|
1689
|
+
def log10(x) 0.0 end
|
1690
|
+
##% sin(Integer or Float) -> Float
|
1691
|
+
def sin(x) 0.0 end
|
1692
|
+
##% sinh(Integer or Float) -> Float
|
1693
|
+
def sinh(x) 0.0 end
|
1694
|
+
##% sqrt(Integer or Float) -> Float
|
1695
|
+
def sqrt(x) 0.0 end
|
1696
|
+
##% tan(Integer or Float) -> Float
|
1697
|
+
def tan(x) 0.0 end
|
1698
|
+
##% tanh(Integer or Float) -> Float
|
1699
|
+
def tanh(x) 0.0 end
|
1700
|
+
end
|
1701
|
+
|
1702
|
+
class Method
|
1703
|
+
# FIXME
|
1704
|
+
end
|
1705
|
+
|
1706
|
+
class Module
|
1707
|
+
##% self.constants() -> Array<String>
|
1708
|
+
def self.constants() [''] end
|
1709
|
+
##% self.nesting() -> Array<Module or Class>
|
1710
|
+
def self.nesting() [Module.new || Class.new] end
|
1711
|
+
##% self.new() -> Module
|
1712
|
+
##% self.new() {Module -> ?} -> Module
|
1713
|
+
def self.new() super end
|
1714
|
+
|
1715
|
+
##% "<"(Module) -> Boolean
|
1716
|
+
def <(other) BOOLEAN end
|
1717
|
+
##% "<="(Module) -> Boolean
|
1718
|
+
def <=(other) BOOLEAN end
|
1719
|
+
##% "<=>"(Module) -> Integer
|
1720
|
+
def <=>(other) 0 end
|
1721
|
+
##% ===(other) -> Boolean
|
1722
|
+
def ===(other) BOOLEAN end
|
1723
|
+
##% ">"(Module) -> Boolean
|
1724
|
+
def >(other) BOOLEAN end
|
1725
|
+
##% ">="(Module) -> Boolean
|
1726
|
+
def >=(other) BOOLEAN end
|
1727
|
+
##% ancestors() -> Array<Module or Class>
|
1728
|
+
def ancestors() [Module.new || Class.new] end
|
1729
|
+
##% autoload(String or Symbol, String) -> nil
|
1730
|
+
def autoload(const_name, feature) nil end
|
1731
|
+
##% autoload(String or Symbol) -> String
|
1732
|
+
def autoload?(const_name) '' end
|
1733
|
+
##% module_eval(String, ?String, ?Integer) -> Object
|
1734
|
+
##% module_eval() {self -> ?} -> Object
|
1735
|
+
def module_eval(*) end
|
1736
|
+
alias :class_eval :module_eval
|
1737
|
+
##% class_variable_defined?(String or Symbol) -> Boolean
|
1738
|
+
def class_variable_defined?(name) BOOLEAN end
|
1739
|
+
##% class_variables() -> Array<String>
|
1740
|
+
def class_variables() [''] end
|
1741
|
+
##% const_defined?(String or Symbol) -> Boolean
|
1742
|
+
def const_defined?(name) BOOLEAN end
|
1743
|
+
##% const_get(String or Symbol) -> Object
|
1744
|
+
def const_get(name) Object.new end
|
1745
|
+
##% const_missing(Symbol) -> nil
|
1746
|
+
def const_missing(name) end
|
1747
|
+
##% const_set(String or Symbol, a) -> a
|
1748
|
+
def const_set(name, value) value end
|
1749
|
+
##% constants() -> Array<String>
|
1750
|
+
def constants() [''] end
|
1751
|
+
##% include?(Module) -> Boolean
|
1752
|
+
def include?() BOOLEAN end
|
1753
|
+
##% included_modules() -> Array<Module>
|
1754
|
+
def included_modules() [Module.new] end
|
1755
|
+
##% instance_method(String or Symbol) -> UnboundMethod
|
1756
|
+
def instance_method(name) UnboundMethod.new end
|
1757
|
+
##% instance_methods(?Boolean) -> Array<String>
|
1758
|
+
def instance_methods(inherited_too = true) [''] end
|
1759
|
+
##% method_defined(String or Symbol) -> Boolean
|
1760
|
+
def method_defined(name) BOOLEAN end
|
1761
|
+
##% name() -> String
|
1762
|
+
def name() '' end
|
1763
|
+
alias :to_s :name
|
1764
|
+
##% private_class_method(*(String or Symbol)) -> self
|
1765
|
+
def private_class_method(*name) self end
|
1766
|
+
##% private_instance_methods(?Boolean) -> Array<String>
|
1767
|
+
def private_instance_methods(inherited_too = true) [''] end
|
1768
|
+
##% private_method_defined?(String or Symbol) -> Boolean
|
1769
|
+
def private_method_defined?(name) BOOLEAN end
|
1770
|
+
##% protected_class_method(*(String or Symbol)) -> self
|
1771
|
+
def protected_class_method(*name) self end
|
1772
|
+
##% protected_instance_methods(?Boolean) -> Array<String>
|
1773
|
+
def protected_instance_methods(inherited_too = true) [''] end
|
1774
|
+
##% protected_method_defined?(String or Symbol) -> Boolean
|
1775
|
+
def protected_method_defined?(name) BOOLEAN end
|
1776
|
+
##% public_class_method(*(String or Symbol)) -> self
|
1777
|
+
def public_class_method(*name) self end
|
1778
|
+
##% public_instance_methods(?Boolean) -> Array<String>
|
1779
|
+
def public_instance_methods(inherited_too = true) [''] end
|
1780
|
+
##% public_method_defined?(String or Symbol) -> Boolean
|
1781
|
+
def public_method_defined?(name) BOOLEAN end
|
1782
|
+
|
1783
|
+
private
|
1784
|
+
##% alias_method(String or Symbol, String or Symbol) -> self
|
1785
|
+
def alias_method(new, original) self end
|
1786
|
+
##% append_features(Module) -> self
|
1787
|
+
def append_features(module_or_class) self end
|
1788
|
+
##% attr(String or Symbol, ?Boolean) -> nil
|
1789
|
+
def attr(name, assignable = false) nil end
|
1790
|
+
##% attr_accessor(*(String or Symbol)) -> nil
|
1791
|
+
def attr_accessor(*name) nil end
|
1792
|
+
##% attr_reader(*(String or Symbol)) -> nil
|
1793
|
+
def attr_reader(*name) nil end
|
1794
|
+
##% attr_writer(*(String or Symbol)) -> nil
|
1795
|
+
def attr_writer(*name) nil end
|
1796
|
+
##% module_exec(*args) {args -> ?} -> Object
|
1797
|
+
def module_exec(*args) yield *args end
|
1798
|
+
alias :class_exec :module_exec
|
1799
|
+
##% class_variable_get(String or Symbol) -> Object
|
1800
|
+
def class_variable_get(name) Object.new end
|
1801
|
+
##% class_variable_set(String or Symbol, a) -> a
|
1802
|
+
def class_variable_set(name, val) val end
|
1803
|
+
##% define_method<a | a <= Proc or Method or UnboundMethod>(String or Symbol, a) -> Proc or Method or UnboundMethod
|
1804
|
+
##^ define_method(String or Symbol) {() -> ?} -> Proc
|
1805
|
+
def define_method(*) end
|
1806
|
+
##% extend_object<a | a <= Module>(a) -> a
|
1807
|
+
def extend_object(mod) mod end
|
1808
|
+
##% extended(Module) -> nil
|
1809
|
+
def extended(class_or_module) end
|
1810
|
+
##% include(*Module) -> self
|
1811
|
+
def include(*mod) self end
|
1812
|
+
##% included(Module) -> nil
|
1813
|
+
def included(class_or_module) end
|
1814
|
+
##% method_added(Symbol) -> nil
|
1815
|
+
def method_added(name) end
|
1816
|
+
##% method_removed(Symbol) -> nil
|
1817
|
+
def method_removed(name) end
|
1818
|
+
##% method_undefined(Symbol) -> nil
|
1819
|
+
def method_undefined(name) end
|
1820
|
+
##% module_function(*(String or Symbol)) -> self
|
1821
|
+
def module_function(*name) self end
|
1822
|
+
##% private(*(String or Symbol)) -> self
|
1823
|
+
def private(*name) self end
|
1824
|
+
##% protected(*(String or Symbol)) -> self
|
1825
|
+
def protected(*name) self end
|
1826
|
+
##% public(*(String or Symbol)) -> self
|
1827
|
+
def public(*name) self end
|
1828
|
+
##% remove_class_variable(String or Symbol) -> Object
|
1829
|
+
def remove_class_variable(name) Object.new end
|
1830
|
+
##% remove_const(String or Symbol) -> Object
|
1831
|
+
def remove_const(name) Object.new end
|
1832
|
+
##% remove_method(*(String or Symbol)) -> self
|
1833
|
+
def remove_method(*name) self end
|
1834
|
+
##% undef_method(*(String or Symbol)) -> self
|
1835
|
+
def undef_method(*name) self end
|
1836
|
+
end
|
1837
|
+
|
1838
|
+
class NilClass
|
1839
|
+
##% &(a) -> FalseClass
|
1840
|
+
def &(other) false end
|
1841
|
+
##% ^(a) -> Boolean
|
1842
|
+
def ^(other) BOOLEAN end
|
1843
|
+
##% nil?() -> TrueClass
|
1844
|
+
def nil?() true end
|
1845
|
+
##% to_a() -> Array
|
1846
|
+
def to_a() [] end
|
1847
|
+
##% to_f() -> Float
|
1848
|
+
def to_f() 0.0 end
|
1849
|
+
##% to_i() -> Fixnum
|
1850
|
+
def to_i() 0 end
|
1851
|
+
##% to_s() -> String
|
1852
|
+
def to_s() '' end
|
1853
|
+
##% "|"(a) -> Boolean
|
1854
|
+
def |(other) BOOLEAN end
|
1855
|
+
end
|
1856
|
+
|
1857
|
+
class Numeric
|
1858
|
+
include Comparable
|
1859
|
+
|
1860
|
+
### Comparable
|
1861
|
+
##% "<"(Numeric) -> Boolean
|
1862
|
+
def <(other) BOOLEAN end
|
1863
|
+
##% "<="(Numeric) -> Boolean
|
1864
|
+
def <=(other) BOOLEAN end
|
1865
|
+
##% ==(Numeric) -> Boolean
|
1866
|
+
def ==(other) BOOLEAN end
|
1867
|
+
##% ">"(Numeric) -> Boolean
|
1868
|
+
def >(other) BOOLEAN end
|
1869
|
+
##% ">="(Numeric) -> Boolean
|
1870
|
+
def >=(other) BOOLEAN end
|
1871
|
+
##% between?(Numeric, Numeric) -> Boolean
|
1872
|
+
def between?(min, max) BOOLEAN end
|
1873
|
+
|
1874
|
+
### Numeric
|
1875
|
+
##% +@() -> self
|
1876
|
+
def +@() self end
|
1877
|
+
##% -@() -> Numeric
|
1878
|
+
def -@() Numeric end
|
1879
|
+
##% "<=>"(Numeric) -> Fixnum
|
1880
|
+
def <=>(other) 0 end
|
1881
|
+
##% abs() -> Numeric
|
1882
|
+
def abs() self end
|
1883
|
+
##% ceil() -> Integer
|
1884
|
+
def ceil() 0 end
|
1885
|
+
##% clone() -> self
|
1886
|
+
def clone() self end
|
1887
|
+
alias :dup :clone
|
1888
|
+
##% coerce(Numeric) -> (Float, Float)
|
1889
|
+
def coerce(other) [0.0, 0.0] end
|
1890
|
+
##% div(Numeric) -> Integer
|
1891
|
+
def div(other) 0 end
|
1892
|
+
##% divmod(Numeric) -> (Integer, Numeric)
|
1893
|
+
def divmod(other) [0, 0] end
|
1894
|
+
##% eql?(Numeric) -> Boolean
|
1895
|
+
def eql?(other) BOOLEAN end
|
1896
|
+
##% quo(Numeric) -> Float
|
1897
|
+
def quo(other) 0.0 end
|
1898
|
+
##% fdiv(Numeric) -> Float
|
1899
|
+
def fdiv(other) 0.0 end
|
1900
|
+
##% floor() -> Integer
|
1901
|
+
def floor() 0 end
|
1902
|
+
##% integer?() -> Boolean
|
1903
|
+
def integer?() BOOLEAN end
|
1904
|
+
##% modulo(Numeric) -> Numeric
|
1905
|
+
def modulo(other) 0 end
|
1906
|
+
##% nonzero?() -> self
|
1907
|
+
def nonzero?() self end
|
1908
|
+
##% remainder(Numeric) -> Numeric
|
1909
|
+
def remainder(other) 0 end
|
1910
|
+
##% round() -> Integer
|
1911
|
+
def round() 0 end
|
1912
|
+
##% step<a | a <= Numeric>(Numeric, ?a) {self or a or Fixnum -> ?} -> self
|
1913
|
+
##% step<a | a <= Numeric>(Numeric, ?a) -> Enumerable::Enumerator<self, self or a or Fixnum>
|
1914
|
+
def step(limit, step = 1) self end
|
1915
|
+
##% to_int() -> Integer
|
1916
|
+
def to_int() 0 end
|
1917
|
+
##% truncate() -> Integer
|
1918
|
+
def truncate() 0 end
|
1919
|
+
##% zero?() -> Boolean
|
1920
|
+
def zero?() BOOLEAN end
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
class Object
|
1924
|
+
##% ==(a) -> Boolean
|
1925
|
+
def ==(other) BOOLEAN end
|
1926
|
+
##% ===(a) -> Boolean
|
1927
|
+
def ===(other) BOOLEAN end
|
1928
|
+
##% =~(a) -> FalseClass
|
1929
|
+
def =~(other) FALSE end
|
1930
|
+
##% __id__() -> Integer
|
1931
|
+
def __id__() 0 end
|
1932
|
+
alias :object_id :__id__
|
1933
|
+
alias :id :__id__
|
1934
|
+
##% send(String or Symbol, *a) -> Object
|
1935
|
+
def send(name, *args) end
|
1936
|
+
##% _dump(Integer) -> String
|
1937
|
+
def _dump(limit) '' end
|
1938
|
+
###% class() -> Class
|
1939
|
+
#def class() Class.new end
|
1940
|
+
alias :type :class
|
1941
|
+
##% clone() -> self
|
1942
|
+
def clone() self end
|
1943
|
+
alias :dup :clone
|
1944
|
+
##% display(?IO) -> nil
|
1945
|
+
def display(out = $stdout) nil end
|
1946
|
+
##% to_enum(?String, *a) -> Enumerator
|
1947
|
+
def to_enum(method = :each, *args) Enumerator.new end
|
1948
|
+
alias :enum_for :to_enum
|
1949
|
+
##% eql?(a) -> Boolean
|
1950
|
+
def eql?(other) BOOLEAN end
|
1951
|
+
##% equal?(a) -> Boolean
|
1952
|
+
def equal?(other) BOOLEAN end
|
1953
|
+
##% extend(*Module) -> self
|
1954
|
+
def extend(*modules) self end
|
1955
|
+
##% freeze() -> self
|
1956
|
+
def freeze() self end
|
1957
|
+
##% frozen?() -> Boolean
|
1958
|
+
def frozen?() BOOLEAN end
|
1959
|
+
##% hash() -> Fixnum
|
1960
|
+
def hash() 0 end
|
1961
|
+
##% inspect() -> String
|
1962
|
+
def inspect() '' end
|
1963
|
+
##% instance_eval(String, ?String, ?Integer) -> Object
|
1964
|
+
##% instance_eval() {Object -> ?} -> Object
|
1965
|
+
def instance_eval(expr, filename = "(eval)", lineno = 1) Object.new end
|
1966
|
+
##% instance_of?(Class) -> Boolean
|
1967
|
+
def instance_of?(klass) BOOLEAN end
|
1968
|
+
##% instance_variable_defined?(String or Symbol) -> Boolean
|
1969
|
+
def instance_variable_defined?(var) BOOLEAN end
|
1970
|
+
##% instance_variable_get(String or Symbol) -> Object
|
1971
|
+
def instance_variable_get(var) Object.new end
|
1972
|
+
##% instance_variable_set(String or Symbol, a) -> a
|
1973
|
+
def instance_variable_set(var, value) value end
|
1974
|
+
##% instance_variables() -> Array<String>
|
1975
|
+
def instance_variables() [''] end
|
1976
|
+
##% is_a?(Module) -> Boolean
|
1977
|
+
def is_a?(mod) BOOLEAN end
|
1978
|
+
alias :kind_of? :is_a?
|
1979
|
+
##% marshal_dump() -> Object
|
1980
|
+
def marshal_dump() Object.new end
|
1981
|
+
##% marshal_load(Object) -> ?
|
1982
|
+
def marshal_load(obj) end
|
1983
|
+
##% method(String or Symbol) -> Method
|
1984
|
+
def method(name) Method.new end
|
1985
|
+
def method_missing(name, *args) end
|
1986
|
+
##% methods(?Boolean) -> Array<String>
|
1987
|
+
def methods(include_inherited = true) [''] end
|
1988
|
+
##% nil?() -> Boolean
|
1989
|
+
def nil?() BOOLEAN end
|
1990
|
+
##% private_methods(?Boolean) -> Array<String>
|
1991
|
+
def private_methods(include_inherited = true) [''] end
|
1992
|
+
##% protected_methods(?Boolean) -> Array<String>
|
1993
|
+
def protected_methods(include_inherited = true) [''] end
|
1994
|
+
##% public_methods(?Boolean) -> Array<String>
|
1995
|
+
def public_methods(include_inherited = true) [''] end
|
1996
|
+
##% respond_to?(String or Symbol, ?Boolean) -> Boolean
|
1997
|
+
def respond_to?(name, include_private = false) BOOLEAN end
|
1998
|
+
##% singleton_methods(?Boolean) -> Array<String>
|
1999
|
+
def singleton_methods(inherited_too = true) [''] end
|
2000
|
+
##% taint() -> self
|
2001
|
+
def taint() self end
|
2002
|
+
##% tainted?() -> Boolean
|
2003
|
+
def tainted?() BOOLEAN end
|
2004
|
+
##% tap() {self -> ?} -> self
|
2005
|
+
def tap() yield self; self end
|
2006
|
+
##% to_a() -> Array
|
2007
|
+
def to_a() [] end
|
2008
|
+
##% to_s() -> String
|
2009
|
+
def to_s() '' end
|
2010
|
+
##% untaint() -> self
|
2011
|
+
def untaint() self end
|
2012
|
+
|
2013
|
+
private
|
2014
|
+
##% to_ary() -> Array
|
2015
|
+
def to_ary() [] end
|
2016
|
+
##% to_hash() -> Hash
|
2017
|
+
def to_hash() {} end
|
2018
|
+
##% to_int() -> Integer
|
2019
|
+
def to_int() 0 end
|
2020
|
+
##% to_io() -> IO
|
2021
|
+
def to_io() IO.new(0) end
|
2022
|
+
##% to_proc() -> Proc
|
2023
|
+
def to_proc() Proc.new end
|
2024
|
+
##% to_regexp() -> Regexp
|
2025
|
+
def to_regexp() Regexp.new end
|
2026
|
+
##% to_str() -> String
|
2027
|
+
def to_str() '' end
|
2028
|
+
|
2029
|
+
# FIXME singleton methods
|
2030
|
+
end
|
2031
|
+
|
2032
|
+
module ObjectSpace
|
2033
|
+
# FIXME
|
2034
|
+
end
|
2035
|
+
|
2036
|
+
module Precision
|
2037
|
+
##% self.included(Module or Class) -> Precision
|
2038
|
+
def self.included(module_or_class) self end
|
2039
|
+
##% self.induced_from(a) -> Object
|
2040
|
+
def self.induced_from(number) 0 end
|
2041
|
+
|
2042
|
+
##% prec(Class) -> Fixnum
|
2043
|
+
def prec(klass) 0 end
|
2044
|
+
##% prec_f() -> Float
|
2045
|
+
def prec_f() 0.0 end
|
2046
|
+
##% prec_i() -> Fixnum
|
2047
|
+
def prec_i() 0 end
|
2048
|
+
end
|
2049
|
+
|
2050
|
+
class Proc
|
2051
|
+
##% call(*a) -> Object
|
2052
|
+
def call(*arg) Object.new end
|
2053
|
+
alias :[] :call
|
2054
|
+
##% arity() -> Fixnum
|
2055
|
+
def arity() 0 end
|
2056
|
+
##% binding() -> Binding
|
2057
|
+
def binding() Binding.new end
|
2058
|
+
##% to_proc() -> self
|
2059
|
+
def to_proc() self end
|
2060
|
+
##% to_s() -> String
|
2061
|
+
def to_s() '' end
|
2062
|
+
end
|
2063
|
+
|
2064
|
+
module Process
|
2065
|
+
PRIO_PGRP = 0
|
2066
|
+
PRIO_PROCESS = 0
|
2067
|
+
PRIO_USER = 0
|
2068
|
+
RLIMIT_AS = 0
|
2069
|
+
RLIMIT_CORE = 0
|
2070
|
+
RLIMIT_CPU = 0
|
2071
|
+
RLIMIT_DATA = 0
|
2072
|
+
RLIMIT_FSIZE = 0
|
2073
|
+
RLIMIT_MEMLOCK = 0
|
2074
|
+
RLIMIT_NOFILE = 0
|
2075
|
+
RLIMIT_NPROC = 0
|
2076
|
+
RLIMIT_RSS = 0
|
2077
|
+
RLIMIT_SBSIZE = 0
|
2078
|
+
RLIMIT_STACK = 0
|
2079
|
+
RLIM_INFINITY = 0
|
2080
|
+
RLIM_SAVED_CUR = 0
|
2081
|
+
RLIM_SAVED_MAX = 0
|
2082
|
+
WNOHANG = 0
|
2083
|
+
WUNTRACED = 0
|
2084
|
+
|
2085
|
+
##% self.abort(?String) -> ?
|
2086
|
+
def self.abort(message = '') end
|
2087
|
+
##% self.detach(Integer) -> Thread
|
2088
|
+
def self.detach(pid) Thread.current end
|
2089
|
+
##% self.exec(String, *String) -> ?
|
2090
|
+
def self.exec(command, *args) end
|
2091
|
+
##% self.exit(?Boolean) -> ?
|
2092
|
+
def self.exit(status = true) end
|
2093
|
+
##% self.exit!(?Boolean) -> ?
|
2094
|
+
def self.exit!(status = true) end
|
2095
|
+
##% self.fork() -> Integer
|
2096
|
+
##% self.fork() {() -> ?} -> Integer
|
2097
|
+
def self.fork() yield; 0 end
|
2098
|
+
|
2099
|
+
module_function
|
2100
|
+
##% egid() -> Integer
|
2101
|
+
def egid() 0 end
|
2102
|
+
##% egid=(Integer) -> ?
|
2103
|
+
def egid=(gid) end
|
2104
|
+
##% euid() -> Integer
|
2105
|
+
def euid() 0 end
|
2106
|
+
##% euid=(Integer) -> ?
|
2107
|
+
def euid=(gid) end
|
2108
|
+
##% getpgid(?Integer) -> Integer
|
2109
|
+
def getpgid(pid = 0) 0 end
|
2110
|
+
##% getpgrp() -> Integer
|
2111
|
+
def getpgrp() 0 end
|
2112
|
+
##% getpriority(Integer, Integer) -> Integer
|
2113
|
+
def getpriority(which, who) 0 end
|
2114
|
+
##% getrlimit(Integer) -> (Integer, Integer)
|
2115
|
+
def getrlimit(resource) [0, 0] end
|
2116
|
+
##% gid() -> Integer
|
2117
|
+
def gid() 0 end
|
2118
|
+
##% gid=(Integer) -> ?
|
2119
|
+
def gid=(gid) end
|
2120
|
+
##% groups() -> Array<Integer>
|
2121
|
+
def groups() [0] end
|
2122
|
+
##% groups=(a) -> ?
|
2123
|
+
def groups=(gids) end
|
2124
|
+
##% initgroups(String, Integer) -> Array<Integer>
|
2125
|
+
def initgroups(user, group) [0] end
|
2126
|
+
##% kill(Integer or String, Integer, *Integer) -> Integer
|
2127
|
+
def kill(signal, pid, *rest) 0 end
|
2128
|
+
##% maxgroups() -> Integer
|
2129
|
+
def maxgroups() 0 end
|
2130
|
+
##% maxgroups=(Integer) -> ?
|
2131
|
+
def maxgroups=(num) end
|
2132
|
+
##% pid() -> Integer
|
2133
|
+
def pid() 0 end
|
2134
|
+
##% ppid() -> Integer
|
2135
|
+
def ppid() 0 end
|
2136
|
+
##% setpgid(Integer, Integer) -> Integer
|
2137
|
+
def setpgid(pid, pgrp) 0 end
|
2138
|
+
##% setpgrp() -> Integer
|
2139
|
+
def setpgrp() 0 end
|
2140
|
+
##% setpriority(Integer, Integer, Integer) -> Integer
|
2141
|
+
def setpriority(which, who, prio) 0 end
|
2142
|
+
##% setrlimit(Integer, Integer, ?Integer) -> nil
|
2143
|
+
def setrlimit(resource, cur_limit, max_limit = nil) nil end
|
2144
|
+
##% setsid() -> Integer
|
2145
|
+
def setsid() 0 end
|
2146
|
+
##% times() -> Struct::Tms
|
2147
|
+
def times() Struct::Tms.new end
|
2148
|
+
##% uid() -> Integer
|
2149
|
+
def uid() 0 end
|
2150
|
+
##% uid=(Integer) -> ?
|
2151
|
+
def uid=(id) end
|
2152
|
+
##% wait() -> Integer
|
2153
|
+
def wait() 0 end
|
2154
|
+
##% wait2() -> (Integer, Process::Status)
|
2155
|
+
def wait2() [0, Process::Status.new] end
|
2156
|
+
##% waitall() -> Array<(Integer, Process::Status)>
|
2157
|
+
def waitall() [[0, Process::Status.new]] end
|
2158
|
+
##% waitpid(Integer, ?Integer) -> Integer
|
2159
|
+
def waitpid(pid, flags = 0) 0 end
|
2160
|
+
##% waitpid2(Integer, ?Integer) -> (Integer, Process::Status)
|
2161
|
+
def waitpid2(pid, flags = 0) [0, Process::Status.new] end
|
2162
|
+
end
|
2163
|
+
|
2164
|
+
module Process::GID
|
2165
|
+
module_function
|
2166
|
+
##% change_privilege(Integer) -> Integer
|
2167
|
+
def change_privilege(id) 0 end
|
2168
|
+
##% eid() -> Integer
|
2169
|
+
def eid() 0 end
|
2170
|
+
##% grant_privilege(Integer) -> Integer
|
2171
|
+
def grant_privilege(id) 0 end
|
2172
|
+
alias :eid= :grant_privilege
|
2173
|
+
##% re_exchange() -> Integer
|
2174
|
+
def re_exchange() 0 end
|
2175
|
+
##% re_exchangeable?() -> Boolean
|
2176
|
+
def re_exchangeable?() BOOLEAN end
|
2177
|
+
##% rid() -> Integer
|
2178
|
+
def rid() 0 end
|
2179
|
+
##% sid_available?() -> Boolean
|
2180
|
+
def sid_available?() BOOLEAN end
|
2181
|
+
##% switch() -> Integer
|
2182
|
+
##% switch() {() -> a} -> a
|
2183
|
+
def switch() yield; 0 end
|
2184
|
+
end
|
2185
|
+
|
2186
|
+
class Process::Status
|
2187
|
+
##% &(Integer) -> Integer
|
2188
|
+
def &(other) Integer end
|
2189
|
+
##% ==(a) -> Boolean
|
2190
|
+
def ==(other) BOOLEAN end
|
2191
|
+
##% ">>"(Integer) -> Integer
|
2192
|
+
def >>(num) 0 end
|
2193
|
+
##% coredump?() -> Boolean
|
2194
|
+
def coredump?() BOOLEAN end
|
2195
|
+
##% exited?() -> Boolean
|
2196
|
+
def exited?() BOOLEAN end
|
2197
|
+
##% exitstatus() -> Integer
|
2198
|
+
def exitstatus() 0 end
|
2199
|
+
##% inspect() -> String
|
2200
|
+
def inspect() '' end
|
2201
|
+
##% pid() -> Integer
|
2202
|
+
def pid() 0 end
|
2203
|
+
##% signaled?() -> Boolean
|
2204
|
+
def signaled?() BOOLEAN end
|
2205
|
+
##% stopped?() -> Boolean
|
2206
|
+
def stopped?() BOOLEAN end
|
2207
|
+
##% stopsig() -> Integer
|
2208
|
+
def stopsig() 0 end
|
2209
|
+
##% success?() -> Boolean
|
2210
|
+
def success?() BOOLEAN end
|
2211
|
+
##% termsig() -> Integer
|
2212
|
+
def termsig() 0 end
|
2213
|
+
##% to_i() -> Integer
|
2214
|
+
def to_i() 0 end
|
2215
|
+
alias :to_int :to_i
|
2216
|
+
##% to_s() -> String
|
2217
|
+
def to_s() '' end
|
2218
|
+
end
|
2219
|
+
|
2220
|
+
module Process::Sys
|
2221
|
+
module_function
|
2222
|
+
##% getegid() -> Integer
|
2223
|
+
def getegid() 0 end
|
2224
|
+
##% geteuid() -> Integer
|
2225
|
+
def geteuid() 0 end
|
2226
|
+
##% getgid() -> Integer
|
2227
|
+
def getgid() 0 end
|
2228
|
+
##% getuid() -> Integer
|
2229
|
+
def getuid() 0 end
|
2230
|
+
##% issetugid() -> Boolean
|
2231
|
+
def issetugid() BOOLEAN end
|
2232
|
+
##% setegid(Integer) -> nil
|
2233
|
+
def setegid(id) nil end
|
2234
|
+
##% seteuid(Integer) -> nil
|
2235
|
+
def seteuid(id) nil end
|
2236
|
+
##% setgid(Integer) -> nil
|
2237
|
+
def setgid(id) nil end
|
2238
|
+
##% setregid(Integer, Integer) -> nil
|
2239
|
+
def setregid(rid, eid) nil end
|
2240
|
+
##% setresgid(Integer, Integer, Integer) -> nil
|
2241
|
+
def setresgid(rid, eid, sid) nil end
|
2242
|
+
##% setresuid(Integer, Integer, Integer) -> nil
|
2243
|
+
def setresuid(rid, eid, sid) nil end
|
2244
|
+
##% setreuid(Integer, Integer) -> nil
|
2245
|
+
def setreuid(rid, eid) nil end
|
2246
|
+
##% setrgid(Integer) -> nil
|
2247
|
+
def setrgid(id) nil end
|
2248
|
+
##% setruid(Integer) -> nil
|
2249
|
+
def setruid(id) nil end
|
2250
|
+
##% setuid(Integer) -> nil
|
2251
|
+
def setuid(id) nil end
|
2252
|
+
end
|
2253
|
+
|
2254
|
+
module Process::UID
|
2255
|
+
module_function
|
2256
|
+
##% change_privilege(Integer) -> Integer
|
2257
|
+
def change_privilege(id) 0 end
|
2258
|
+
##% eid() -> Integer
|
2259
|
+
def eid() 0 end
|
2260
|
+
##% grant_privilege(Integer) -> Integer
|
2261
|
+
def grant_privilege(id) 0 end
|
2262
|
+
alias :eid= :grant_privilege
|
2263
|
+
##% re_exchange() -> Integer
|
2264
|
+
def re_exchange() 0 end
|
2265
|
+
##% re_exchangeable?() -> Boolean
|
2266
|
+
def re_exchangeable?() BOOLEAN end
|
2267
|
+
##% rid() -> Integer
|
2268
|
+
def rid() 0 end
|
2269
|
+
##% sid_available?() -> Boolean
|
2270
|
+
def sid_available?() BOOLEAN end
|
2271
|
+
##% switch() -> Integer
|
2272
|
+
##% switch() {() -> a} -> a
|
2273
|
+
def switch() yield; 0 end
|
2274
|
+
end
|
2275
|
+
|
2276
|
+
##% Range<t>
|
2277
|
+
class Range
|
2278
|
+
include Enumerable
|
2279
|
+
|
2280
|
+
##% self.new(a, b, ?Boolean) -> Range<a or b>
|
2281
|
+
def self.new() end
|
2282
|
+
|
2283
|
+
##% ==(a) -> Boolean
|
2284
|
+
def ==(other) BOOLEAN end
|
2285
|
+
##% ===(a) -> Boolean
|
2286
|
+
def ===(other) BOOLEAN end
|
2287
|
+
alias :include? :===
|
2288
|
+
alias :member? :===
|
2289
|
+
##% begin() -> t
|
2290
|
+
def begin() end
|
2291
|
+
alias :first :begin
|
2292
|
+
##% each() {t -> ?} -> self
|
2293
|
+
##% each() -> Enumerator<self, t>
|
2294
|
+
def each() self end
|
2295
|
+
##% end() -> t
|
2296
|
+
def end() end
|
2297
|
+
alias :last :end
|
2298
|
+
##% eql?(a) -> Boolean
|
2299
|
+
def eql?(other) BOOLEAN end
|
2300
|
+
##% equal?(a) -> Boolean
|
2301
|
+
def equal?(other) BOOLEAN end
|
2302
|
+
##% exclude_end?() -> Boolean
|
2303
|
+
def exclude_end?() BOOLEAN end
|
2304
|
+
##% hash() -> Integer
|
2305
|
+
def hash() 0 end
|
2306
|
+
##% step(?Fixnum) {t -> ?} -> self
|
2307
|
+
##% step(?Fixnum) -> Enumerator<self, t>
|
2308
|
+
def step(s = 1) end
|
2309
|
+
end
|
2310
|
+
|
2311
|
+
class Regexp
|
2312
|
+
EXTENDED = 0
|
2313
|
+
IGNORECASE = 0
|
2314
|
+
MULTILINE = 0
|
2315
|
+
|
2316
|
+
##% self.compile(String, Fixnum or Boolean, String) -> Regexp
|
2317
|
+
def self.compile(string, option = nil, code = nil) Regexp.new end
|
2318
|
+
##% self.escape(String, ?String) -> String
|
2319
|
+
def self.escape(string, kcode = $KCODE) '' end
|
2320
|
+
##% self.last_match() -> MatchData
|
2321
|
+
##% self.last_match(Integer) -> MatchData
|
2322
|
+
def self.last_match(n = nil) MatchData.new end
|
2323
|
+
##% self.union(*(String or Regexp)) -> Regexp
|
2324
|
+
def self.union(*pattern) Regexp.new end
|
2325
|
+
|
2326
|
+
##% ==(Regexp) -> Boolean
|
2327
|
+
def ==(other) BOOLEAN end
|
2328
|
+
alias :eql? :==
|
2329
|
+
##% =~(String) -> Fixnum
|
2330
|
+
def =~(string) 0 end
|
2331
|
+
##% ===(string) -> Boolean
|
2332
|
+
def ===(string) BOOLEAN end
|
2333
|
+
##% casefold?() -> Boolean
|
2334
|
+
def casefold?() BOOLEAN end
|
2335
|
+
##% hash() -> Fixnum
|
2336
|
+
def hash() 0 end
|
2337
|
+
##% inspect() -> String
|
2338
|
+
def inspect() '' end
|
2339
|
+
##% kcode() -> String
|
2340
|
+
def kcode() '' end
|
2341
|
+
##% match(String) -> MatchData
|
2342
|
+
def match(str) MatchData.new end
|
2343
|
+
##% options() -> Integer
|
2344
|
+
def options() 0 end
|
2345
|
+
##% source() -> String
|
2346
|
+
def source() '' end
|
2347
|
+
##% to_s() -> String
|
2348
|
+
def to_s() '' end
|
2349
|
+
##% ~() -> Fixnum
|
2350
|
+
def ~() 0 end
|
2351
|
+
end
|
2352
|
+
|
2353
|
+
module Signal
|
2354
|
+
module_function
|
2355
|
+
##% list() -> Hash<String, Integer>
|
2356
|
+
def list() {'' => 1} end
|
2357
|
+
##% trap(String or Symbol, String or Proc) -> String or Proc
|
2358
|
+
##% trap(String or Symbol) {() -> ?} -> String or Proc
|
2359
|
+
def trap(signal, command = nil) yield; '' end
|
2360
|
+
end
|
2361
|
+
|
2362
|
+
##% String<| String <= t>
|
2363
|
+
class String
|
2364
|
+
include Enumerable
|
2365
|
+
include Comparable
|
2366
|
+
|
2367
|
+
##% self.new(?String) -> String
|
2368
|
+
def self.new(string = '') '' end
|
2369
|
+
|
2370
|
+
##% %(a) -> String
|
2371
|
+
def %(args) '' end
|
2372
|
+
##% "*"(Integer) -> String
|
2373
|
+
def *(times) '' end
|
2374
|
+
##% +(String) -> String
|
2375
|
+
def +(other) '' end
|
2376
|
+
##% "<<"(?Fixnum or String) -> self
|
2377
|
+
def <<(other) self end
|
2378
|
+
alias :concat :<<
|
2379
|
+
##% "<=>"(String) -> Integer
|
2380
|
+
def <=>(other) 0 end
|
2381
|
+
##% ==(a) -> Boolean
|
2382
|
+
def ==(other) BOOLEAN end
|
2383
|
+
# FIXME =~
|
2384
|
+
##% =~(a) -> Integer
|
2385
|
+
def =~(other) 0 end
|
2386
|
+
##% [](Integer) -> Fixnum
|
2387
|
+
##% [](Integer, Integer) -> String
|
2388
|
+
##% [](String) -> String
|
2389
|
+
##% [](Regexp, ?Integer) -> String
|
2390
|
+
##% [](Range) -> String
|
2391
|
+
def [](*) 0 end
|
2392
|
+
alias :slice :[]
|
2393
|
+
##% []=(Integer, String or Integer) -> String
|
2394
|
+
##% []=(Integer, Integer, String or Integer) -> String
|
2395
|
+
##% []=(String, String or Integer) -> String
|
2396
|
+
##% []=(Regexp, ?Integer, String or Integer) -> String
|
2397
|
+
##% []=(Range, String or Integer) -> String
|
2398
|
+
def []=(*) '' end
|
2399
|
+
##% each_byte() {Fixnum -> ?} -> self
|
2400
|
+
##% each_byte() -> Enumerator<self, Fixnum>
|
2401
|
+
def each_byte() yield 0; self end
|
2402
|
+
alias :bytes :each_byte
|
2403
|
+
##% bytesize() -> Integer
|
2404
|
+
def bytesize() 0 end
|
2405
|
+
##% capitalize() -> String
|
2406
|
+
def capitalize() '' end
|
2407
|
+
##% capitalize!() -> self
|
2408
|
+
def capitalize!() '' end
|
2409
|
+
##% casecmp(String) -> Integer
|
2410
|
+
def casecmp(other) 0 end
|
2411
|
+
##% center(Integer, ?String) -> String
|
2412
|
+
def center(width, padding = ' ') '' end
|
2413
|
+
##% each_char() {String -> ?} -> self
|
2414
|
+
##% each_char() -> Enumerator<self, String>
|
2415
|
+
def each_char() yield ''; self end
|
2416
|
+
alias :chars :each_char
|
2417
|
+
##% chomp(?String) -> String
|
2418
|
+
def chomp(rs = $/) '' end
|
2419
|
+
##% chomp!(?String) -> self
|
2420
|
+
def chomp!(rs = $/) self end
|
2421
|
+
##% chop() -> String
|
2422
|
+
def chop() '' end
|
2423
|
+
##% chop!() -> self
|
2424
|
+
def chop!() self end
|
2425
|
+
##% count(*String) -> Integer
|
2426
|
+
def count(*chars) 0 end
|
2427
|
+
##% crypt(String) -> String
|
2428
|
+
def crypt(salt) '' end
|
2429
|
+
##% delete(*String) -> String
|
2430
|
+
def delete(*strs) '' end
|
2431
|
+
##% delete!(*String) -> self
|
2432
|
+
def delete!(*strs) self end
|
2433
|
+
##% downcase() -> String
|
2434
|
+
def downcase() '' end
|
2435
|
+
##% downcase!() -> self
|
2436
|
+
def downcase!() self end
|
2437
|
+
##% dump() -> String
|
2438
|
+
def dump() '' end
|
2439
|
+
##% each(?String) {String -> ?} -> self
|
2440
|
+
##% each(?String) -> Enumerator<self, String>
|
2441
|
+
def each(rs = $/) yield ''; self end
|
2442
|
+
alias :each_line :each
|
2443
|
+
alias :lines :each
|
2444
|
+
##% empty?() -> Boolean
|
2445
|
+
def empty?() Boolean end
|
2446
|
+
##% end_with?(String) -> Boolean
|
2447
|
+
def end_with?(str) BOOLEAN end
|
2448
|
+
##% eql?(a) -> Boolean
|
2449
|
+
def eql?(other) BOOLEAN end
|
2450
|
+
##% gsub(String or Regexp, String) -> String
|
2451
|
+
##% gsub(String or Regexp) {String -> ?} -> String
|
2452
|
+
##% gsub(String or Regexp) -> Enumerator<String, String>
|
2453
|
+
def gsub(pattern, replace = nil) '' end
|
2454
|
+
##% gsub!(String or Regexp, String) -> self
|
2455
|
+
##% gsub!(String or Regexp) {String -> ?} -> self
|
2456
|
+
##% gsub!(String or Regexp) -> Enumerator<String, self>
|
2457
|
+
def gsub!(pattern, replace = nil) self end
|
2458
|
+
##% hash() -> Integer
|
2459
|
+
def hash() 0 end
|
2460
|
+
##% hex() -> Integer
|
2461
|
+
def hex() 0 end
|
2462
|
+
##% include?(String or Integer) -> Boolean
|
2463
|
+
def include?(substr) BOOLEAN end
|
2464
|
+
##% index(String or Regexp, ?Integer) -> Integer
|
2465
|
+
def index(pattern, pos = 0) 0 end
|
2466
|
+
##% insert(Integer, String) -> self
|
2467
|
+
def insert(pos, other) self end
|
2468
|
+
##% inspect() -> String
|
2469
|
+
def inspect() '' end
|
2470
|
+
##% intern() -> Symbol
|
2471
|
+
def intern() :a end
|
2472
|
+
alias :to_sym :intern
|
2473
|
+
##% length() -> Integer
|
2474
|
+
def length() 0 end
|
2475
|
+
alias :length :size
|
2476
|
+
##% ljust(Integer, ?String) -> String
|
2477
|
+
def ljust(width, padding = ' ') '' end
|
2478
|
+
##% lstrip() -> String
|
2479
|
+
def lstrip() '' end
|
2480
|
+
##% lstrip!() -> self
|
2481
|
+
def lstrip!() self end
|
2482
|
+
##% match(String or Regexp) -> MatchData
|
2483
|
+
def match(regexp) MatchData.new end
|
2484
|
+
##% succ() -> String
|
2485
|
+
def succ() '' end
|
2486
|
+
alias :next :succ
|
2487
|
+
##% succ!() -> self
|
2488
|
+
def succ!() self end
|
2489
|
+
alias :next! :succ!
|
2490
|
+
##% oct() -> Integer
|
2491
|
+
def oct() 0 end
|
2492
|
+
##% partition(String or Regexp) -> (String, String, String)
|
2493
|
+
def partition(sep) ['', '', ''] end
|
2494
|
+
##% replace(String) -> String
|
2495
|
+
def replace(other) self end
|
2496
|
+
##% reverse() -> String
|
2497
|
+
def reverse() '' end
|
2498
|
+
##% reverse!() -> self
|
2499
|
+
def reverse!() self end
|
2500
|
+
##% rindex(String or Regexp, ?Integer) -> Integer
|
2501
|
+
def rindex(pattern, pos = 0) 0 end
|
2502
|
+
##% rjust(Integer, ?String) -> String
|
2503
|
+
def rjust(width, padding = ' ') '' end
|
2504
|
+
##% rpartition(String or Regexp) -> (String, String, String)
|
2505
|
+
def rpartition(sep) ['', '', ''] end
|
2506
|
+
##% rstrip() -> String
|
2507
|
+
def rstrip() '' end
|
2508
|
+
##% rstrip!() -> self
|
2509
|
+
def rstrip!() self end
|
2510
|
+
##% scan(String or Regexp) -> Array<String> or Array<Array<String> >
|
2511
|
+
##% scan(String or Regexp) {String -> ?} -> self
|
2512
|
+
def scan(re) [''] || [['']] end
|
2513
|
+
alias :slice! :[]
|
2514
|
+
##% split(?(String or Regexp), ?Integer) -> Array<String> or Array<Array<String> >
|
2515
|
+
def split(sep = $;, limit = 0) [''] || [['']] end
|
2516
|
+
##% squeeze(*String) -> String
|
2517
|
+
def squeeze(*chars) '' end
|
2518
|
+
##% squeeze!(*String) -> self
|
2519
|
+
def squeeze!(*chars) self end
|
2520
|
+
##% start_with?(String) -> Boolean
|
2521
|
+
def start_with?(str) BOOLEAN end
|
2522
|
+
##% strip() -> String
|
2523
|
+
def strip() '' end
|
2524
|
+
##% strip!() -> self
|
2525
|
+
def strip!() self end
|
2526
|
+
##% sub(String or Regexp, String) -> String
|
2527
|
+
##% sub(String or Regexp) {String -> ?} -> String
|
2528
|
+
##% sub(String or Regexp) -> Enumerator<String, String>
|
2529
|
+
def sub(pattern, replace = nil) '' end
|
2530
|
+
##% sub!(String or Regexp, String) -> self
|
2531
|
+
##% sub!(String or Regexp) {String -> ?} -> self
|
2532
|
+
##% sub!(String or Regexp) -> Enumerator<String, self>
|
2533
|
+
def sub!(pattern, replace = nil) self end
|
2534
|
+
##% sum(?Integer) -> Integer
|
2535
|
+
def sum(bits = 16) 0 end
|
2536
|
+
##% swapcase() -> String
|
2537
|
+
def swapcase() '' end
|
2538
|
+
##% swapcase!() -> self
|
2539
|
+
def swapcase!() self end
|
2540
|
+
##% to_f() -> Float
|
2541
|
+
def to_f() 0.0 end
|
2542
|
+
##% to_i(?Integer) -> Integer
|
2543
|
+
def to_i(base = 10) 0 end
|
2544
|
+
##% to_s() -> self
|
2545
|
+
def to_s() self end
|
2546
|
+
alias :to_str :to_s
|
2547
|
+
##% tr(String, String) -> String
|
2548
|
+
def tr(pattern, replace) '' end
|
2549
|
+
##% tr!(String, String) -> self
|
2550
|
+
def tr!(pattern, replace) self end
|
2551
|
+
##% tr_s(String, String) -> String
|
2552
|
+
def tr_s(pattern, replace) '' end
|
2553
|
+
##% tr_s!(String, String) -> self
|
2554
|
+
def tr_s!(pattern, replace) self end
|
2555
|
+
##% unpack(String) -> Array
|
2556
|
+
def unpack(template) [] end
|
2557
|
+
##% upcase() -> String
|
2558
|
+
def upcase() '' end
|
2559
|
+
##% upcase!() -> self
|
2560
|
+
def upcase!() self end
|
2561
|
+
##% upto(String, ?Boolean) {String -> ?} -> self
|
2562
|
+
def upto(max, exclusive = false) yield ''; self end
|
2563
|
+
end
|
2564
|
+
|
2565
|
+
class Struct
|
2566
|
+
# FIXME
|
2567
|
+
end
|
2568
|
+
|
2569
|
+
class Struct::Tms
|
2570
|
+
# FIXME
|
2571
|
+
end
|
2572
|
+
|
2573
|
+
class Symbol
|
2574
|
+
##% self.all_symbols() -> Array<Symbol>
|
2575
|
+
def all_symbols() [:a] end
|
2576
|
+
|
2577
|
+
##% id2name() -> String
|
2578
|
+
def id2name() '' end
|
2579
|
+
alias :to_s :id2name
|
2580
|
+
##% inspect() -> String
|
2581
|
+
def inspect() '' end
|
2582
|
+
##% to_i() -> Integer
|
2583
|
+
def to_i() 0 end
|
2584
|
+
alias :to_int :to_i
|
2585
|
+
##% to_proc() -> Proc
|
2586
|
+
def to_proc() Proc.new end
|
2587
|
+
##% to_sym() -> self
|
2588
|
+
def to_sym() self end
|
2589
|
+
end
|
2590
|
+
|
2591
|
+
class Thread
|
2592
|
+
##% self.abort_on_exception() -> Boolean
|
2593
|
+
def self.abort_on_exception() BOOLEAN end
|
2594
|
+
##% self.abort_on_exception=(Boolean) -> ?
|
2595
|
+
def self.abort_on_exception=(newstate) end
|
2596
|
+
##% self.critical() -> Boolean
|
2597
|
+
def self.critical() BOOLEAN end
|
2598
|
+
##% self.critical=(Boolean) -> ?
|
2599
|
+
def self.critical=(newstate) end
|
2600
|
+
##% self.current() -> Thread
|
2601
|
+
def self.current() Thread.new {} end
|
2602
|
+
##% self.exit() -> ?
|
2603
|
+
def self.exit() end
|
2604
|
+
##% self.start(*a) {*a -> ?} -> Thread
|
2605
|
+
def self.start(*arg) yield *arg; Thread.current end
|
2606
|
+
##% self.fork(*a) {*a -> ?} -> Thread
|
2607
|
+
def self.fork(*arg) yield *arg; Thread.current end
|
2608
|
+
##% self.kill(Thread) -> Thread
|
2609
|
+
def self.kill(thread) thread end
|
2610
|
+
##% self.list() -> [Thead]
|
2611
|
+
def self.list() [Thread.current] end
|
2612
|
+
##% self.main() -> Thread
|
2613
|
+
def self.main() Thread.current end
|
2614
|
+
##% self.new(*a) {*a -> ?} -> Thread
|
2615
|
+
def self.new(*arg) yield *arg; super() end
|
2616
|
+
##% self.pass() -> nil
|
2617
|
+
def self.pass() nil end
|
2618
|
+
##% self.stop() -> nil
|
2619
|
+
def self.stop() nil end
|
2620
|
+
|
2621
|
+
##% [](Symbol or String) -> Object
|
2622
|
+
def [](name) Object.new end
|
2623
|
+
##% []=(Symbol or String, a) -> a
|
2624
|
+
def []=(name, val) val end
|
2625
|
+
##% abort_on_exception() -> Boolean
|
2626
|
+
def abort_on_exception() BOOLEAN end
|
2627
|
+
##% abort_on_exception=(Boolean) -> ?
|
2628
|
+
def abort_on_exception=(newstate) end
|
2629
|
+
##% alive?() -> Boolean
|
2630
|
+
def alive?() BOOLEAN end
|
2631
|
+
##% exit() -> self
|
2632
|
+
def exit() self end
|
2633
|
+
alias :kill :exit
|
2634
|
+
alias :terminate :exit
|
2635
|
+
##% exit!() -> self
|
2636
|
+
def exit!() self end
|
2637
|
+
alias :kill! :exit!
|
2638
|
+
alias :terminate! :exit!
|
2639
|
+
##% group() -> ThreadGroup
|
2640
|
+
def group() ThreadGroup.new end
|
2641
|
+
##% join() -> self
|
2642
|
+
##% join(Numeric) -> self
|
2643
|
+
def join(limit = nil) self end
|
2644
|
+
##% key?(Symbol or String) -> Boolean
|
2645
|
+
def key?(name) BOOLEAN end
|
2646
|
+
##% keys() -> Array<Symbol>
|
2647
|
+
def keys() [:a] end
|
2648
|
+
##% priority() -> Integer
|
2649
|
+
def priority() 0 end
|
2650
|
+
##% priority=(Integer) -> nil
|
2651
|
+
def priority=(val) nil end
|
2652
|
+
##% raise() -> nil
|
2653
|
+
##% raise(String) -> nil
|
2654
|
+
##% raise(?, ?String, Array<String>) -> nil
|
2655
|
+
def raise(*) end
|
2656
|
+
##% run() -> self
|
2657
|
+
def run() self end
|
2658
|
+
##% safe_level() -> Integer
|
2659
|
+
def safe_level() 0 end
|
2660
|
+
##% status() -> String or FalseClass
|
2661
|
+
def status() '' || false end
|
2662
|
+
##% stop?() -> Boolean
|
2663
|
+
def stop?() BOOLEAN end
|
2664
|
+
##% value() -> Object
|
2665
|
+
def value() Object.new end
|
2666
|
+
##% wakeup() -> self
|
2667
|
+
def wakeup() self end
|
2668
|
+
end
|
2669
|
+
|
2670
|
+
class ThreadGroup
|
2671
|
+
Default = ThreadGroup.new
|
2672
|
+
|
2673
|
+
##% add(Thread) -> self
|
2674
|
+
def add(thread) self end
|
2675
|
+
##% enclose() -> self
|
2676
|
+
def enclose() self end
|
2677
|
+
##% enclosed?() -> Boolean
|
2678
|
+
def enclosed?() BOOLEAN end
|
2679
|
+
##% list() -> Array<Thread>
|
2680
|
+
def list() [Thread.current] end
|
2681
|
+
end
|
2682
|
+
|
2683
|
+
class Time
|
2684
|
+
include Comparable
|
2685
|
+
|
2686
|
+
##% self.at(Time or Integer, ?Integer) -> Time
|
2687
|
+
def self.at(time, usec) Time.new end
|
2688
|
+
##% self.gm(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String) -> Time
|
2689
|
+
##% self.gm(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, a, b, Boolean, c) -> Time
|
2690
|
+
def self.gm(*) Time.new end
|
2691
|
+
##% self.utc(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String) -> Time
|
2692
|
+
##% self.utc(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, a, b, Boolean, c) -> Time
|
2693
|
+
def self.utc(*) Time.new end
|
2694
|
+
##% self.local(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String) -> Time
|
2695
|
+
##% self.local(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, a, b, Boolean, c) -> Time
|
2696
|
+
def self.local(*) Time.new end
|
2697
|
+
##% self.mktime(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String) -> Time
|
2698
|
+
##% self.mktime(Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, Integer or String, a, b, Boolean, c) -> Time
|
2699
|
+
def self.mktime(*) Time.new end
|
2700
|
+
##% self.now() -> Time
|
2701
|
+
def self.now() Time.new end
|
2702
|
+
##% self.times() -> Struct::Tms
|
2703
|
+
def self.times() Struct::Tms.new end
|
2704
|
+
|
2705
|
+
##% +(Integer) -> Time
|
2706
|
+
def +(other) Time.new end
|
2707
|
+
##% -(Integer or Time) -> Time
|
2708
|
+
def -(other) Time.new end
|
2709
|
+
##% "<=>"(Time) -> Fixnum
|
2710
|
+
def <=>(other) 0 end
|
2711
|
+
##% asctime() -> String
|
2712
|
+
def asctime() '' end
|
2713
|
+
alias :ctime :asctime
|
2714
|
+
##% mday() -> Integer
|
2715
|
+
def mday() 0 end
|
2716
|
+
alias :day :mday
|
2717
|
+
##% isdst() -> Boolean
|
2718
|
+
def isdst() BOOLEAN end
|
2719
|
+
alias :dst? :isdst
|
2720
|
+
##% eql?(Time) -> Boolean
|
2721
|
+
def eql?(other) BOOLEAN end
|
2722
|
+
##% getgm() -> Time
|
2723
|
+
def getgm() Time.new end
|
2724
|
+
alias :getutc :getgm
|
2725
|
+
##% getlocal() -> Time
|
2726
|
+
def getlocal() Time.new end
|
2727
|
+
##% gmt?() -> Boolean
|
2728
|
+
def gmt?() BOOLEAN end
|
2729
|
+
alias :utc? :gmt?
|
2730
|
+
##% utc_offset() -> Integer
|
2731
|
+
def utc_offset() 0 end
|
2732
|
+
alias :gmt_offset :utc_offset
|
2733
|
+
alias :gmtoff :utc_offset
|
2734
|
+
##% gmtime() -> self
|
2735
|
+
def gmtime() self end
|
2736
|
+
##% hour() -> Integer
|
2737
|
+
def hour() 0 end
|
2738
|
+
##% localtime() -> self
|
2739
|
+
def localtime() self end
|
2740
|
+
##% min() -> Integer
|
2741
|
+
def min() 0 end
|
2742
|
+
##% mon() -> Integer
|
2743
|
+
def mon() 0 end
|
2744
|
+
alias :month :mon
|
2745
|
+
##% sec() -> Integer
|
2746
|
+
def sec() 0 end
|
2747
|
+
##% strftime(String) -> String
|
2748
|
+
def strftime(format) '' end
|
2749
|
+
##% succ() -> Time
|
2750
|
+
def succ() Time.new end
|
2751
|
+
##% to_a() -> (Integer, Integer, Integer, Integer, Integer, Integer, Integer, Integer, Boolean, String)
|
2752
|
+
def to_a() [0, 0, 0, 0, 0, 0, 0, 0, BOOLEAN, ''] end
|
2753
|
+
##% to_f() -> Float
|
2754
|
+
def to_f() 0.0 end
|
2755
|
+
##% to_i() -> Integer
|
2756
|
+
def to_i() 0 end
|
2757
|
+
alias :tv_sec :to_i
|
2758
|
+
##% to_s() -> String
|
2759
|
+
def to_s() '' end
|
2760
|
+
##% usec() -> Integer
|
2761
|
+
def usec() 0 end
|
2762
|
+
alias :tv_usec :usec
|
2763
|
+
##% wday() -> Integer
|
2764
|
+
def wday() 0 end
|
2765
|
+
##% yday() -> Integer
|
2766
|
+
def yda() 0 end
|
2767
|
+
##% year() -> Integer
|
2768
|
+
def year() 0 end
|
2769
|
+
##% zone() -> String
|
2770
|
+
def zone() '' end
|
2771
|
+
end
|
2772
|
+
|
2773
|
+
class TrueClass
|
2774
|
+
##% &(a) -> Boolean
|
2775
|
+
def %(other) BOOLEAN end
|
2776
|
+
##% ^(a) -> Boolean
|
2777
|
+
def ^(other) BOOLEAN end
|
2778
|
+
##% to_s() -> String
|
2779
|
+
def to_s() '' end
|
2780
|
+
##% "|"(a) -> Boolean
|
2781
|
+
def |(other) BOOLEAN end
|
2782
|
+
end
|
2783
|
+
|
2784
|
+
class UnboundMethod
|
2785
|
+
# FIXME
|
2786
|
+
end
|
2787
|
+
|
2788
|
+
class Exception; end
|
2789
|
+
class StandardError < Exception; end
|
2790
|
+
class IOError < StandardError; end
|
2791
|
+
class SystemCallError < StandardError; end
|
2792
|
+
class RangeError < StandardError; end
|
2793
|
+
class SignalException < Exception; end
|
2794
|
+
class ScriptError < Exception; end
|
2795
|
+
|
2796
|
+
class ArgumentError < StandardError; end
|
2797
|
+
class EOFError < IOError; end
|
2798
|
+
class Errno::E2BIG < SystemCallError; end
|
2799
|
+
class Errno::EACCES < SystemCallError; end
|
2800
|
+
class Errno::EADDRINUSE < SystemCallError; end
|
2801
|
+
class Errno::EADDRNOTAVAIL < SystemCallError; end
|
2802
|
+
class Errno::EADV < SystemCallError; end
|
2803
|
+
class Errno::EAFNOSUPPORT < SystemCallError; end
|
2804
|
+
class Errno::EAGAIN < SystemCallError; end
|
2805
|
+
class Errno::EALREADY < SystemCallError; end
|
2806
|
+
class Errno::EBADE < SystemCallError; end
|
2807
|
+
class Errno::EBADF < SystemCallError; end
|
2808
|
+
class Errno::EBADFD < SystemCallError; end
|
2809
|
+
class Errno::EBADMSG < SystemCallError; end
|
2810
|
+
class Errno::EBADR < SystemCallError; end
|
2811
|
+
class Errno::EBADRQC < SystemCallError; end
|
2812
|
+
class Errno::EBADSLT < SystemCallError; end
|
2813
|
+
class Errno::EBFONT < SystemCallError; end
|
2814
|
+
class Errno::EBUSY < SystemCallError; end
|
2815
|
+
class Errno::ECHILD < SystemCallError; end
|
2816
|
+
class Errno::ECHRNG < SystemCallError; end
|
2817
|
+
class Errno::ECOMM < SystemCallError; end
|
2818
|
+
class Errno::ECONNABORTED < SystemCallError; end
|
2819
|
+
class Errno::ECONNRESET < SystemCallError; end
|
2820
|
+
class Errno::EDEADLK < SystemCallError; end
|
2821
|
+
class Errno::EDEADLOCK < SystemCallError; end
|
2822
|
+
class Errno::EDESTADDRREQ < SystemCallError; end
|
2823
|
+
class Errno::EDOM < SystemCallError; end
|
2824
|
+
class Errno::EDOTDOT < SystemCallError; end
|
2825
|
+
class Errno::EDQUOT < SystemCallError; end
|
2826
|
+
class Errno::EEXIST < SystemCallError; end
|
2827
|
+
class Errno::EFAULT < SystemCallError; end
|
2828
|
+
class Errno::EFBIG < SystemCallError; end
|
2829
|
+
class Errno::EHOSTDOWN < SystemCallError; end
|
2830
|
+
class Errno::EHOSTUNREACH < SystemCallError; end
|
2831
|
+
class Errno::EIDRM < SystemCallError; end
|
2832
|
+
class Errno::EILSEQ < SystemCallError; end
|
2833
|
+
class Errno::EINPROGRESS < SystemCallError; end
|
2834
|
+
class Errno::EINTR < SystemCallError; end
|
2835
|
+
class Errno::EINVAL < SystemCallError; end
|
2836
|
+
class Errno::EIO < SystemCallError; end
|
2837
|
+
class Errno::EISCONN < SystemCallError; end
|
2838
|
+
class Errno::EISDIR < SystemCallError; end
|
2839
|
+
class Errno::EISNAM < SystemCallError; end
|
2840
|
+
class Errno::EL2HLT < SystemCallError; end
|
2841
|
+
class Errno::EL2NSYNC < SystemCallError; end
|
2842
|
+
class Errno::EL3HLT < SystemCallError; end
|
2843
|
+
class Errno::EL3RST < SystemCallError; end
|
2844
|
+
class Errno::ELIBACC < SystemCallError; end
|
2845
|
+
class Errno::ELIBBAD < SystemCallError; end
|
2846
|
+
class Errno::ELIBEXEC < SystemCallError; end
|
2847
|
+
class Errno::ELIBMAX < SystemCallError; end
|
2848
|
+
class Errno::ELIBSCN < SystemCallError; end
|
2849
|
+
class Errno::ELNRNG < SystemCallError; end
|
2850
|
+
class Errno::ELOOP < SystemCallError; end
|
2851
|
+
class Errno::EMFILE < SystemCallError; end
|
2852
|
+
class Errno::EMLINK < SystemCallError; end
|
2853
|
+
class Errno::EMSGSIZE < SystemCallError; end
|
2854
|
+
class Errno::EMULTIHOP < SystemCallError; end
|
2855
|
+
class Errno::ENAMETOOLONG < SystemCallError; end
|
2856
|
+
class Errno::ENAVAIL < SystemCallError; end
|
2857
|
+
class Errno::ENETDOWN < SystemCallError; end
|
2858
|
+
class Errno::ENETRESET < SystemCallError; end
|
2859
|
+
class Errno::ENETUNREACH < SystemCallError; end
|
2860
|
+
class Errno::ENFILE < SystemCallError; end
|
2861
|
+
class Errno::ENOANO < SystemCallError; end
|
2862
|
+
class Errno::ENOBUFS < SystemCallError; end
|
2863
|
+
class Errno::ENOCSI < SystemCallError; end
|
2864
|
+
class Errno::ENODATA < SystemCallError; end
|
2865
|
+
class Errno::ENODEV < SystemCallError; end
|
2866
|
+
class Errno::ENOENT < SystemCallError; end
|
2867
|
+
class Errno::ENOEXEC < SystemCallError; end
|
2868
|
+
class Errno::ENOLCK < SystemCallError; end
|
2869
|
+
class Errno::ENOLINK < SystemCallError; end
|
2870
|
+
class Errno::ENOMEM < SystemCallError; end
|
2871
|
+
class Errno::ENOMSG < SystemCallError; end
|
2872
|
+
class Errno::ENONET < SystemCallError; end
|
2873
|
+
class Errno::ENOPKG < SystemCallError; end
|
2874
|
+
class Errno::ENOPROTOOPT < SystemCallError; end
|
2875
|
+
class Errno::ENOSPC < SystemCallError; end
|
2876
|
+
class Errno::ENOSR < SystemCallError; end
|
2877
|
+
class Errno::ENOSTR < SystemCallError; end
|
2878
|
+
class Errno::ENOSYS < SystemCallError; end
|
2879
|
+
class Errno::ENOTBLK < SystemCallError; end
|
2880
|
+
class Errno::ENOTCONN < SystemCallError; end
|
2881
|
+
class Errno::ENOTDIR < SystemCallError; end
|
2882
|
+
class Errno::ENOTEMPTY < SystemCallError; end
|
2883
|
+
class Errno::ENOTNAM < SystemCallError; end
|
2884
|
+
class Errno::ENOTSOCK < SystemCallError; end
|
2885
|
+
class Errno::ENOTTY < SystemCallError; end
|
2886
|
+
class Errno::ENOTUNIQ < SystemCallError; end
|
2887
|
+
class Errno::ENXIO < SystemCallError; end
|
2888
|
+
class Errno::EOPNOTSUPP < SystemCallError; end
|
2889
|
+
class Errno::EOVERFLOW < SystemCallError; end
|
2890
|
+
class Errno::EPERM < SystemCallError; end
|
2891
|
+
class Errno::EPFNOSUPPORT < SystemCallError; end
|
2892
|
+
class Errno::EPIPE < SystemCallError; end
|
2893
|
+
class Errno::EPROTO < SystemCallError; end
|
2894
|
+
class Errno::EPROTONOSUPPORT < SystemCallError; end
|
2895
|
+
class Errno::EPROTOTYPE < SystemCallError; end
|
2896
|
+
class Errno::ERANGE < SystemCallError; end
|
2897
|
+
class Errno::EREMCHG < SystemCallError; end
|
2898
|
+
class Errno::EREMOTE < SystemCallError; end
|
2899
|
+
class Errno::EREMOTEIO < SystemCallError; end
|
2900
|
+
class Errno::ERESTART < SystemCallError; end
|
2901
|
+
class Errno::EROFS < SystemCallError; end
|
2902
|
+
class Errno::ERROR < SystemCallError; end
|
2903
|
+
class Errno::ESHUTDOWN < SystemCallError; end
|
2904
|
+
class Errno::ESOCKTNOSUPPORT < SystemCallError; end
|
2905
|
+
class Errno::ESPIPE < SystemCallError; end
|
2906
|
+
class Errno::ESRCH < SystemCallError; end
|
2907
|
+
class Errno::ESRMNT < SystemCallError; end
|
2908
|
+
class Errno::ESTALE < SystemCallError; end
|
2909
|
+
class Errno::ESTRPIPE < SystemCallError; end
|
2910
|
+
class Errno::ETIME < SystemCallError; end
|
2911
|
+
class Errno::ETIMEDOUT < SystemCallError; end
|
2912
|
+
class Errno::ETOOMANYREFS < SystemCallError; end
|
2913
|
+
class Errno::ETXTBSY < SystemCallError; end
|
2914
|
+
class Errno::EUCLEAN < SystemCallError; end
|
2915
|
+
class Errno::EUNATCH < SystemCallError; end
|
2916
|
+
class Errno::EUSERS < SystemCallError; end
|
2917
|
+
class Errno::EWOULDBLOCK < SystemCallError; end
|
2918
|
+
class Errno::EXDEV < SystemCallError; end
|
2919
|
+
class Errno::EXFULL < SystemCallError; end
|
2920
|
+
class Errno::EXXX < SystemCallError; end
|
2921
|
+
|
2922
|
+
class Exception
|
2923
|
+
##% self.new(?String) -> Exception
|
2924
|
+
def self.new(error_message = nil) super() end
|
2925
|
+
##% self.exception(?String) -> Exception
|
2926
|
+
def self.exception(error_message = nil) self.new(error_message) end
|
2927
|
+
|
2928
|
+
##% backtrace() -> Array<String>
|
2929
|
+
def backtrace() [''] end
|
2930
|
+
##% exception() -> self
|
2931
|
+
##% exception(String) -> Exception
|
2932
|
+
def exception(error_message = nil) self end
|
2933
|
+
##% message() -> String
|
2934
|
+
def message() '' end
|
2935
|
+
alias :to_s :message
|
2936
|
+
alias :to_str :message
|
2937
|
+
##% set_backtrace(String or Array<String>) -> String or Array<String>
|
2938
|
+
def set_backtrace(errinfo) '' || [''] end
|
2939
|
+
end
|
2940
|
+
|
2941
|
+
class FloatDomainError < RangeError; end
|
2942
|
+
class IndexError < StandardError; end
|
2943
|
+
class Interrupt < SignalException; end
|
2944
|
+
class LoadError < ScriptError; end
|
2945
|
+
|
2946
|
+
class LocalJumpError < StandardError
|
2947
|
+
##% exit_value() -> Object
|
2948
|
+
def exit_value() Object.new end
|
2949
|
+
##% reason() -> Symbol
|
2950
|
+
def reason() :a end
|
2951
|
+
end
|
2952
|
+
|
2953
|
+
class NameError < StandardError
|
2954
|
+
##% self.new(String) -> NameError
|
2955
|
+
def self.new(error_message) super() end
|
2956
|
+
|
2957
|
+
##% name() -> Symbol
|
2958
|
+
def name() :a end
|
2959
|
+
##% to_s() -> String
|
2960
|
+
def to_s() '' end
|
2961
|
+
end
|
2962
|
+
|
2963
|
+
class NoMemoryError < Exception; end
|
2964
|
+
|
2965
|
+
class NoMethodError < NameError
|
2966
|
+
##% self.new(?String) -> Exception
|
2967
|
+
def self.new(error_message = nil) super() end
|
2968
|
+
|
2969
|
+
##% args() -> Array<Object>
|
2970
|
+
def args() [Object.new] end
|
2971
|
+
end
|
2972
|
+
|
2973
|
+
class NotImplementedError < ScriptError; end
|
2974
|
+
class RangeError < StandardError; end
|
2975
|
+
class RegexpError < StandardError; end
|
2976
|
+
class RuntimeError < StandardError; end
|
2977
|
+
class ScriptError < Exception; end
|
2978
|
+
class SecurityError < StandardError; end
|
2979
|
+
class SignalException < Exception; end
|
2980
|
+
class StandardError < Exception; end
|
2981
|
+
class StopIteration < IndexError; end
|
2982
|
+
class SyntaxError < ScriptError; end
|
2983
|
+
|
2984
|
+
class SystemCallError < StandardError
|
2985
|
+
##% self.new(String, ?Integer) -> SystemCallError
|
2986
|
+
##% self.new(Integer) -> SystemCallError
|
2987
|
+
def self.new(*) super() end
|
2988
|
+
|
2989
|
+
##% errono() -> Fixnum
|
2990
|
+
def errorno() 0 end
|
2991
|
+
end
|
2992
|
+
|
2993
|
+
class SystemExit < Exception
|
2994
|
+
##% self.new(?Integer, ?String) -> SystemExit
|
2995
|
+
def self.new(status = 0, error_message = '') super() end
|
2996
|
+
|
2997
|
+
##% status() -> Fixnum
|
2998
|
+
def status() 0 end
|
2999
|
+
##% success?() -> Boolean
|
3000
|
+
def success?() BOOLEAN end
|
3001
|
+
end
|
3002
|
+
|
3003
|
+
class SystemStackError < StandardError; end
|
3004
|
+
class ThreadError < StandardError; end
|
3005
|
+
class TypeError < StandardError; end
|
3006
|
+
class ZeroDivisionError < StandardError; end
|