ruby2js 2.1.2 → 2.1.3

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
  SHA1:
3
- metadata.gz: 14b0c4f156b0f543afde3c3a0a8e339b5ece18bc
4
- data.tar.gz: 363dafc8a9f6814ea754af8025f60c1668ec2e70
3
+ metadata.gz: 5e5edb71b06e042e1f87d9e2680248470f3f1bb2
4
+ data.tar.gz: 596aa3eb654805d1dcc3f4ad7a7921ca2a439c48
5
5
  SHA512:
6
- metadata.gz: 1d58ad86fa85e3ecbe88be541faa486013407a993cf3b0a14e0b05771863219f0f69eeb67e8b5597eeeedb8d54d515d48058aa2b4792099aba4421286833972d
7
- data.tar.gz: b03e0fa66154948bd4abdff01b766b916b6758efffe70de8b6e3515d76f171e353e5c3ba06a5f3694f761970cc58d07d7fc8dab9b237e9c82298604238d96758
6
+ metadata.gz: ab33c1be48046ea978ebfbd5c1cc0eaf982ad0c498c0c97336c22ad562e045f11a8b55070ac56652eaadc8a4590f3ae71a37b7ff133942cdcad0d9f467419ce6
7
+ data.tar.gz: c28e2fe9c0c5bafc81d21d2e18b475e0f45ec3bcf2997702063b1b1b42513d5461f728c4da2d6e126c58ccf3cf99b7b266c725928f224f92eb976c584e1a637c
@@ -69,7 +69,8 @@ module Ruby2JS
69
69
  parse s(:not, receiver)
70
70
 
71
71
  elsif method == :[]
72
- parse receiver; put '['; parse_all(*args, join: ', '); put ']'
72
+ (group_receiver ? group(receiver) : parse(receiver))
73
+ put '['; parse_all(*args, join: ', '); put ']'
73
74
 
74
75
  elsif method == :[]=
75
76
  parse receiver; put '['; parse_all(*args[0..-2], join: ', '); put '] = '
@@ -190,8 +190,9 @@ module Ruby2JS
190
190
  super
191
191
 
192
192
  elsif index.type == :regexp
193
- process S(:send, S(:send, target, :match, index), :[],
194
- args[1] || s(:int, 0))
193
+ process S(:send,
194
+ s(:or, S(:send, target, :match, index), s(:array)),
195
+ :[], args[1] || s(:int, 0))
195
196
 
196
197
  elsif node.children.length != 3
197
198
  super
@@ -2,7 +2,7 @@ module Ruby2JS
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ruby2js 2.1.2 ruby lib
2
+ # stub: ruby2js 2.1.3 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby2js".freeze
6
- s.version = "2.1.2"
6
+ s.version = "2.1.3"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
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: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby