minruby 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/minruby.rb +4 -0
  3. data/minruby.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: acc3f9fdbb746f75aad18ce1cc0cfdb29d45782d
4
- data.tar.gz: 72720a91841eb61826ab427e78c994ce351879f7
3
+ metadata.gz: aeb72d67db5adb8d1c86015bc7690a3f6b422fe5
4
+ data.tar.gz: 9dded6956ce1dc91844f1925ab9b880a8faf51ce
5
5
  SHA512:
6
- metadata.gz: 1ef4d6ea9a71b916733dd6519c230a8acdac72ae36cac6f74b9878d41e503f0987933f5a326788ac54dbae263ca762c460ddf44b15e1f4dca50f6e2e562d083a
7
- data.tar.gz: 21ab769f0b430c9fc5f76f580857ec616da46366c8427fa7eb0f3c302b5b944ca25a283d906ca4dd49d16224e4ed2537d5cc81a4cdfe248a9f5ee96af29423f8
6
+ metadata.gz: f2bffb0301125a832771fe82e0a03fcd5a8251c9e15f6e57b56e79fcd3169f507f87bc0374ca16c30bd2ee6ee93bda45b32b4a128fd1844032bdacfd0681d955
7
+ data.tar.gz: e031f709009447a08c918b74773906eaf06944def618c7acc54a727d8d11ec9f2d0182c3b9e266b75da50bd3ec27bb3d0701cd0f3cc5abd29d0cbf0cc2035602
@@ -85,6 +85,10 @@ class MinRubyParser
85
85
  end
86
86
  when :@int
87
87
  ["lit", exp[1].to_i]
88
+ when :unary
89
+ v = simplify(exp[2])
90
+ raise if v[0] != "lit"
91
+ ["lit", -v[1]]
88
92
  when :string_literal
89
93
  ["lit", exp[1][1][1]]
90
94
  when :symbol_literal
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "minruby"
4
- spec.version = "1.0.2"
4
+ spec.version = "1.0.3"
5
5
  spec.authors = ["Yusuke Endoh"]
6
6
  spec.email = ["mame@ruby-lang.org"]
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke Endoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-20 00:00:00.000000000 Z
11
+ date: 2016-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler