ruby2js 3.3.2 → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby2js/converter/hash.rb +11 -0
- data/lib/ruby2js/version.rb +1 -1
- data/ruby2js.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a14485c0400fde35f0734d3e237f2b2d7fdda41377c9d26aeede802634a619e4
|
4
|
+
data.tar.gz: 3f27f9ac6e92ab7a67823361dfea1b42b09c9dd405dfd7855e278114b3dfccfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0953480e1e37ebf92fd62af8a55ef77c203c42b2a4ca2880d623a573feadc5b294319cac53f48f36dc5564f4420425cd238dccf3b4cb2a07aab31b7c474cbb9a'
|
7
|
+
data.tar.gz: 600d4fcd56f5da3144a3f48d872bfdd9293e3de233b47b6b3fb5473a4424e1d4db55b59fef9a59f96df2ba82978dea52b6cb0c070929867a89ce2fa0ea170291
|
@@ -95,6 +95,17 @@ module Ruby2JS
|
|
95
95
|
elsif not [:lambda, :proc].include? method
|
96
96
|
anonfn = false
|
97
97
|
end
|
98
|
+
|
99
|
+
# use fat arrow syntax if block contains a reference to 'this'
|
100
|
+
if anonfn
|
101
|
+
walk = proc do |ast|
|
102
|
+
anonfn = false if ast == s(:send, nil, :this)
|
103
|
+
ast.children.each do |child|
|
104
|
+
walk[child] if child.is_a? Parser::AST::Node
|
105
|
+
end
|
106
|
+
end
|
107
|
+
walk[right]
|
108
|
+
end
|
98
109
|
end
|
99
110
|
|
100
111
|
if \
|
data/lib/ruby2js/version.rb
CHANGED
data/ruby2js.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.files = %w(ruby2js.gemspec README.md) + Dir.glob("{lib}/**/*")
|
16
16
|
s.homepage = "http://github.com/rubys/ruby2js".freeze
|
17
17
|
s.licenses = ["MIT".freeze]
|
18
|
-
s.required_ruby_version = Gem::Requirement.new(">=
|
18
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.0".freeze)
|
19
19
|
s.summary = "Minimal yet extensible Ruby to JavaScript conversion.".freeze
|
20
20
|
|
21
21
|
s.add_dependency('parser')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby2js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
@@ -154,7 +154,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
154
|
requirements:
|
155
155
|
- - ">="
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
157
|
+
version: '2.0'
|
158
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
159
|
requirements:
|
160
160
|
- - ">="
|