ruby2js 4.1.5 → 4.1.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 412d541e9884847f722555edd11a71ead4c2358632976bf32f530ca270eb539b
4
- data.tar.gz: f32b8d14177ee0f08466abfbb4a96017e6dc8a4e5a2226476c77f26affa7f81d
3
+ metadata.gz: 8f29494a95eb89f049d35d1a431e50e1ac4fb526fbe7544dff5b7c699b2aae9c
4
+ data.tar.gz: cd87036fc9542ce81e7dedb379ee5eb874f7ea9144096ff7f1b496b2c3bad5a3
5
5
  SHA512:
6
- metadata.gz: c4be8efc1eb9ec2f1de81f5c0236b6ea3c868522043e305cb0dfcac80e61b1e57e5639f77ad2a0a6aa44b7b5eb87842db5a7072f42ab25ad625474904d88e4b8
7
- data.tar.gz: 6f8c9c91f1ca05f4363023ee588e356226dbafcf09235d5ab25c5ffaef564109a4c653673bbf8a6da1c0b3a231f84231f25089fdd0c0207e7ddd6c8d25dfd7d7
6
+ metadata.gz: 574b8d730585898be4ce8506b256f90a9ed092e88edcbe5af82cf5d0f70aa7177b31486deee3b615269fe8011f0b9ac0efb38381bf6df924d04cfddcd5dda799
7
+ data.tar.gz: 68d618097efa0fc47509129242d84e72349dd3619b9238df83820ade29fca243d7cb19c6627d9fe5b14c64fb3fb6a5fa1d9f1cfa93bd2a5753acb84645a56fc4
@@ -17,8 +17,8 @@ module Ruby2JS
17
17
 
18
18
  LOGICAL = :and, :not, :or
19
19
  OPERATORS = [:[], :[]=], [:not, :!], [:**], [:*, :/, :%], [:+, :-],
20
- [:>>, :<<], [:&], [:^, :|], [:<=, :<, :>, :>=], [:==, :!=, :===, :"!=="],
21
- [:and, :or]
20
+ [:>>, :<<], [:&], [:^, :|], [:<=, :<, :>, :>=],
21
+ [:==, :!=, :===, :"!==", :=~, :!~], [:and, :or]
22
22
 
23
23
  INVERT_OP = {
24
24
  :< => :>=,
@@ -73,12 +73,12 @@ module Ruby2JS
73
73
  s(:and, left, right)
74
74
  elsif conditionally_equals(left, right.children.first)
75
75
  # a && a.b => a&.b
76
- right.updated(:csend, [left, right.children.last])
76
+ right.updated(:csend, [left, *right.children[1..-1]])
77
77
  elsif conditionally_equals(left.children.last, right.children.first)
78
78
  # a && b && b.c => a && b&.c
79
79
  left.updated(:and, [left.children.first,
80
80
  left.children.last.updated(:csend,
81
- [left.children.last, right.children.last])])
81
+ [left.children.last, *right.children[1..-1]])])
82
82
  else
83
83
  s(:and, left, right)
84
84
  end
@@ -2,7 +2,7 @@ module Ruby2JS
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 4
4
4
  MINOR = 1
5
- TINY = 5
5
+ TINY = 6
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: 4.1.5
4
+ version: 4.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-08-14 00:00:00.000000000 Z
12
+ date: 2021-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser