ruby2js 3.3.4 → 3.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbbd02345fff681ac3c1e611c58256c5c3856daaed4d977bc5bc483f14394601
4
- data.tar.gz: 849a7bd34c2e8da7cb8fdc508b2ae8139c8c8d2cde85314e6f00226001d415c9
3
+ metadata.gz: 290afa338befd02c8b83d54b13032a5e2d59c8a9cb96f2c413042d069c2614f8
4
+ data.tar.gz: ed8506fa6b7dfbdcec3c59f6496a4cae822b18e597fb7030a10ae403d8b7c942
5
5
  SHA512:
6
- metadata.gz: e6ba76328764be80c07f4a79312b2d2b3f2095905705549db5af68612945699267909cfcd060c47409dc9daa78939285d8953de93b21f67ea406e4f7aa3a364d
7
- data.tar.gz: 0b48f4bbdf1e989a69da07feded1841d088388c49b789dfd9c99db112ff6da9e3b2c79a49e36123c2cc9f49c67899dd7bcd321cd6f62ddd23e89f93b11f76a0b
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) or ast == s(:send, nil, :this)
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|
@@ -2,7 +2,7 @@ module Ruby2JS
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 3
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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
4
+ version: 3.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby