minruby 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/minruby.rb +6 -1
- data/minruby.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c2e04cb8c070ef68a0f11c86611f7afca3ab3bb727c5676592449ff261de9831
|
4
|
+
data.tar.gz: 25d1f895846838bd5c41db5a9e59efef2e9fbea8dedaa84a85139ce76fdb5a71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36cea46fa064d30251cf9ba1632b1412409fcad2f29f2096611e9358a9b68a7cee7653426ea31b21ad9c8499932fa5ac692ea13ffe7c8cc9e5d34e6cab65f213
|
7
|
+
data.tar.gz: 7bf43c0b0344795bfcdc6612edcd39ec63229255d85659ba66bc5ce91a2e5d2776f4fbda0bc4d6cae9c07f76ab79f8db851b868ab7d0e7a3a214ae167d2d5e86
|
data/lib/minruby.rb
CHANGED
@@ -51,6 +51,11 @@ class MinRubyParser
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
["if", cond_exp, then_exp, else_exp]
|
54
|
+
when :ifop
|
55
|
+
cond_exp = simplify(exp[1])
|
56
|
+
then_exp = simplify(exp[2])
|
57
|
+
else_exp = simplify(exp[3])
|
58
|
+
["if", cond_exp, then_exp, else_exp]
|
54
59
|
when :if_mod
|
55
60
|
cond_exp = simplify(exp[1])
|
56
61
|
then_exp = make_stmts([exp[2]])
|
@@ -90,7 +95,7 @@ class MinRubyParser
|
|
90
95
|
raise if v[0] != "lit"
|
91
96
|
["lit", -v[1]]
|
92
97
|
when :string_literal
|
93
|
-
["lit", exp[1][1][1]]
|
98
|
+
["lit", exp[1][1] ? exp[1][1][1] : ""]
|
94
99
|
when :symbol_literal
|
95
100
|
["lit", exp[1][1][1].to_sym]
|
96
101
|
when :assign
|
data/minruby.gemspec
CHANGED
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.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yusuke Endoh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
76
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
77
|
+
rubygems_version: 2.7.3
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: A helper library for "Ruby de manabu Ruby"
|