rubinius-melbourne 2.2.1.0 → 2.2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/rubinius/melbourne/grammar.cpp +546 -544
- data/ext/rubinius/melbourne/grammar.y +5 -3
- data/lib/rubinius/melbourne/version.rb +1 -1
- data/rubinius-melbourne.gemspec +2 -0
- metadata +2 -3
- data/ext/rubinius/melbourne/missing.hpp +0 -29
@@ -19,7 +19,6 @@
|
|
19
19
|
|
20
20
|
#include "namespace.h"
|
21
21
|
#include "melbourne.hpp"
|
22
|
-
#include "missing.hpp"
|
23
22
|
#include "grammar.hpp"
|
24
23
|
#include "parser_state.hpp"
|
25
24
|
#include "visitor.hpp"
|
@@ -7306,12 +7305,15 @@ parser_negate_lit(rb_parser_state* parser_state, NODE *node)
|
|
7306
7305
|
case T_FIXNUM:
|
7307
7306
|
node->nd_lit = LONG2FIX(-FIX2LONG(node->nd_lit));
|
7308
7307
|
break;
|
7308
|
+
case T_BIGNUM:
|
7309
|
+
case T_RATIONAL:
|
7310
|
+
case T_COMPLEX:
|
7311
|
+
node->nd_lit = REF(rb_funcall(node->nd_lit, rb_intern("-@"), 0, 0));
|
7312
|
+
break;
|
7309
7313
|
case T_FLOAT:
|
7310
7314
|
node->nd_lit = REF(rb_float_new(-NUM2DBL(node->nd_lit)));
|
7311
7315
|
break;
|
7312
|
-
case T_BIGNUM:
|
7313
7316
|
default:
|
7314
|
-
node->nd_lit = REF(rb_funcall(node->nd_lit, rb_intern("-@"), 0, 0));
|
7315
7317
|
break;
|
7316
7318
|
}
|
7317
7319
|
return node;
|
data/rubinius-melbourne.gemspec
CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
spec.version = CodeTools::Melbourne::VERSION
|
19
19
|
|
20
|
+
spec.required_ruby_version = ">= 1.9.2"
|
21
|
+
|
20
22
|
spec.add_development_dependency "rubinius-processor", "~> 2.0"
|
21
23
|
spec.add_development_dependency "rubinius-compiler", "~> 2.0"
|
22
24
|
spec.add_development_dependency "rubinius-ast", "~> 2.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubinius-melbourne
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Shirai
|
@@ -131,7 +131,6 @@ files:
|
|
131
131
|
- ext/rubinius/melbourne/lex.c.blt
|
132
132
|
- ext/rubinius/melbourne/melbourne.cpp
|
133
133
|
- ext/rubinius/melbourne/melbourne.hpp
|
134
|
-
- ext/rubinius/melbourne/missing.hpp
|
135
134
|
- ext/rubinius/melbourne/node.hpp
|
136
135
|
- ext/rubinius/melbourne/node_types.cpp
|
137
136
|
- ext/rubinius/melbourne/node_types.hpp
|
@@ -224,7 +223,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
224
223
|
requirements:
|
225
224
|
- - ">="
|
226
225
|
- !ruby/object:Gem::Version
|
227
|
-
version:
|
226
|
+
version: 1.9.2
|
228
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
228
|
requirements:
|
230
229
|
- - ">="
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#ifndef MEL_MISSING_HPP
|
2
|
-
#define MEL_MISSING_HPP
|
3
|
-
|
4
|
-
extern "C" {
|
5
|
-
|
6
|
-
#ifndef rb_long2int
|
7
|
-
#if SIZEOF_INT < SIZEOF_LONG
|
8
|
-
int rb_long2int(long n) {
|
9
|
-
int i = (int)n;
|
10
|
-
if((long)i != n) {
|
11
|
-
rb_raise(rb_eRangeError, "long value is outside of range of int");
|
12
|
-
}
|
13
|
-
return i;
|
14
|
-
}
|
15
|
-
#else
|
16
|
-
#define rb_long2int(n) ((int)n)
|
17
|
-
#endif
|
18
|
-
#endif
|
19
|
-
|
20
|
-
#ifndef rb_rational_new
|
21
|
-
VALUE rb_rational_new(VALUE a, VALUE b) {
|
22
|
-
VALUE cls = rb_const_get(rb_cObject, rb_intern("Rational"));
|
23
|
-
return rb_funcall(cls, rb_intern("new"), 2, a, b);
|
24
|
-
}
|
25
|
-
#endif
|
26
|
-
|
27
|
-
} /* extern "C" */
|
28
|
-
|
29
|
-
#endif
|