ruby2js 3.3.4 → 3.3.5
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 +4 -4
- data/lib/ruby2js/converter/hash.rb +6 -1
- data/lib/ruby2js/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 290afa338befd02c8b83d54b13032a5e2d59c8a9cb96f2c413042d069c2614f8
|
4
|
+
data.tar.gz: ed8506fa6b7dfbdcec3c59f6496a4cae822b18e597fb7030a10ae403d8b7c942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bfe229a4ac6718d7a79cc41d2ef8b014ac49c4f73366791ffb2b2487b1661dc9a74d91672f866464ba00b83dcbae464b4d1ce0f602aa37fef7c59cd0c2865be
|
7
|
+
data.tar.gz: 9a2a2c7feb84284009900ece1a605922de023fb3173158799fb889cfd0d4ac6ff12d10cfbafa062e8cb133024ee58be204d0abc8fd7ef76d0b8fc20714069346
|
@@ -99,8 +99,13 @@ module Ruby2JS
|
|
99
99
|
# use fat arrow syntax if block contains a reference to 'this'
|
100
100
|
if anonfn
|
101
101
|
walk = proc do |ast|
|
102
|
-
if ast == s(:self)
|
102
|
+
if ast == s(:self)
|
103
103
|
anonfn = false
|
104
|
+
elsif ast.type == :send and ast.children.first == nil
|
105
|
+
method = ast.children.last if ast.children.length == 2
|
106
|
+
if @rbstack.any? {|rb| rb[method]} or method == :this
|
107
|
+
anonfn = false
|
108
|
+
end
|
104
109
|
end
|
105
110
|
|
106
111
|
ast.children.each do |child|
|
data/lib/ruby2js/version.rb
CHANGED