ruby2js 2.0.8 → 2.0.9

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: 3b5f7f59fa74d47b93a9f3d1ae2d8ef09b116c3a
4
- data.tar.gz: 332c856728771828a6bc20231f3137b7d6ff0452
3
+ metadata.gz: e245926a3e1b1904076667992a1df36b847290c8
4
+ data.tar.gz: a97f75c7fffc309c239f93b82c07f83ddd659d8f
5
5
  SHA512:
6
- metadata.gz: c0b8a76bf571992893eea975c45d765bea2a9540654bd17a494cb28f7ebd008f758c696077708c4942f47f8a3d641a3cf11566408cb5cbe263f4d076189c9559
7
- data.tar.gz: 4420b3a3dc8f18dc19d245ccbe76ff8324747cb787a0d79a2304a541ea483457ff8f1c34c758359b23d5fe6e27c2c84077aab24915a06087579ce6522d3fec0a
6
+ metadata.gz: 00b8b27362597b9c89450371072363c6468ce572f09f1e0ccacec551ac3a96bf418ba166b60031c73fefe5fdb4770dec6c419af3815f5dce5c61b22b4d0bb876
7
+ data.tar.gz: 219e208e335a4d642205edb6c07537213d15dd25ba55d249dc1ffd6708a59d06b86e0619e23d722b98dd45f75c10bffdcbc844c5c8e5b26a29b5312cbbc0c077
data/README.md CHANGED
@@ -197,6 +197,7 @@ the script.
197
197
  * `.sub!` and `.gsub!` become equivalent `x = x.replace` statements
198
198
  * `.map!`, `.reverse!`, and `.select` become equivalent
199
199
  `.splice(0, .length, *.method())` statements
200
+ * `Array(x)` becomes `Array.prototype.slice.call(x)`
200
201
  * `setInterval` and `setTimeout` allow block to be treated as the
201
202
  first parameter on the call
202
203
  * for the following methods, if the block consists entirely of a simple
@@ -29,6 +29,10 @@ module Ruby2JS
29
29
  elsif method == :to_s
30
30
  process S(:call, target, :toString, *args)
31
31
 
32
+ elsif method == :Array and target == nil
33
+ process S(:send, s(:attr, s(:attr, s(:const, nil, :Array),
34
+ :prototype), :slice), :call, *args)
35
+
32
36
  elsif method == :to_a
33
37
  process S(:call, target, :toArray, *args)
34
38
 
@@ -2,7 +2,7 @@ module Ruby2JS
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- TINY = 8
5
+ TINY = 9
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/ruby2js.gemspec CHANGED
@@ -1,21 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: ruby2js 2.0.8 ruby lib
2
+ # stub: ruby2js 2.0.9 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby2js"
6
- s.version = "2.0.8"
6
+ s.version = "2.0.9"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
10
10
  s.authors = ["Sam Ruby"]
11
- s.date = "2015-06-29"
11
+ s.date = "2015-09-04"
12
12
  s.description = " The base package maps Ruby syntax to JavaScript semantics.\n Filters may be provided to add Ruby-specific or framework specific\n behavior.\n"
13
13
  s.email = "rubys@intertwingly.net"
14
14
  s.files = ["README.md", "lib/ruby2js", "lib/ruby2js.rb", "lib/ruby2js/cgi.rb", "lib/ruby2js/converter", "lib/ruby2js/converter.rb", "lib/ruby2js/converter/arg.rb", "lib/ruby2js/converter/args.rb", "lib/ruby2js/converter/array.rb", "lib/ruby2js/converter/begin.rb", "lib/ruby2js/converter/block.rb", "lib/ruby2js/converter/blockpass.rb", "lib/ruby2js/converter/boolean.rb", "lib/ruby2js/converter/break.rb", "lib/ruby2js/converter/case.rb", "lib/ruby2js/converter/casgn.rb", "lib/ruby2js/converter/class.rb", "lib/ruby2js/converter/const.rb", "lib/ruby2js/converter/cvar.rb", "lib/ruby2js/converter/cvasgn.rb", "lib/ruby2js/converter/def.rb", "lib/ruby2js/converter/defined.rb", "lib/ruby2js/converter/defs.rb", "lib/ruby2js/converter/dstr.rb", "lib/ruby2js/converter/for.rb", "lib/ruby2js/converter/hash.rb", "lib/ruby2js/converter/if.rb", "lib/ruby2js/converter/in.rb", "lib/ruby2js/converter/ivar.rb", "lib/ruby2js/converter/ivasgn.rb", "lib/ruby2js/converter/kwbegin.rb", "lib/ruby2js/converter/literal.rb", "lib/ruby2js/converter/logical.rb", "lib/ruby2js/converter/masgn.rb", "lib/ruby2js/converter/module.rb", "lib/ruby2js/converter/next.rb", "lib/ruby2js/converter/nil.rb", "lib/ruby2js/converter/nthref.rb", "lib/ruby2js/converter/opasgn.rb", "lib/ruby2js/converter/prototype.rb", "lib/ruby2js/converter/regexp.rb", "lib/ruby2js/converter/return.rb", "lib/ruby2js/converter/self.rb", "lib/ruby2js/converter/send.rb", "lib/ruby2js/converter/super.rb", "lib/ruby2js/converter/sym.rb", "lib/ruby2js/converter/undef.rb", "lib/ruby2js/converter/until.rb", "lib/ruby2js/converter/untilpost.rb", "lib/ruby2js/converter/var.rb", "lib/ruby2js/converter/vasgn.rb", "lib/ruby2js/converter/while.rb", "lib/ruby2js/converter/whilepost.rb", "lib/ruby2js/converter/xstr.rb", "lib/ruby2js/execjs.rb", "lib/ruby2js/filter", "lib/ruby2js/filter/angular-resource.rb", "lib/ruby2js/filter/angular-route.rb", "lib/ruby2js/filter/angularrb.rb", "lib/ruby2js/filter/camelCase.rb", "lib/ruby2js/filter/functions.rb", "lib/ruby2js/filter/jquery.rb", "lib/ruby2js/filter/minitest-jasmine.rb", "lib/ruby2js/filter/react.rb", "lib/ruby2js/filter/require.rb", "lib/ruby2js/filter/return.rb", "lib/ruby2js/filter/rubyjs.rb", "lib/ruby2js/filter/strict.rb", "lib/ruby2js/filter/underscore.rb", "lib/ruby2js/rails.rb", "lib/ruby2js/serializer.rb", "lib/ruby2js/sinatra.rb", "lib/ruby2js/version.rb", "ruby2js.gemspec"]
15
15
  s.homepage = "http://github.com/rubys/ruby2js"
16
16
  s.licenses = ["MIT"]
17
17
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
18
- s.rubygems_version = "2.4.5"
18
+ s.rubygems_version = "2.4.5.1"
19
19
  s.summary = "Minimal yet extensible Ruby to JavaScript conversion."
20
20
 
21
21
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2js
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.8
4
+ version: 2.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 2.4.5
127
+ rubygems_version: 2.4.5.1
128
128
  signing_key:
129
129
  specification_version: 4
130
130
  summary: Minimal yet extensible Ruby to JavaScript conversion.