opal 0.7.0.rc1 → 0.7.0

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: 92e17e48bf5a163e7dae89bb90448a82ec66baa1
4
- data.tar.gz: 313106590cfd949c9810a5866b1866e20de0b3cd
3
+ metadata.gz: 3a9bf851ab7303452422a1822f7a2f312f4b2797
4
+ data.tar.gz: 01582cdf5ce1c13f075e52f6fb2905b761817e28
5
5
  SHA512:
6
- metadata.gz: 40b7b2836d698ab35eff8fb344335d376ccebad0b9c01998cab188ba94e0b4e77d2b9873163fbaa3d19665b916da51ec55ca76ab0d30122e175ed50dd57c1c20
7
- data.tar.gz: fe4e07293db5de3a1b4441453c9f9288dcfd3db46d71679a7de247ead82fc59661f7a6f1111790f05c952b8be8e503607871330f07b24929609cceb50e49abf5
6
+ metadata.gz: b41fd0b62ece98c9a117dd185ccc20708c751de45878c4fc4498f8125c76ec6f61227577ea4be1a472ae54e0658b4e23f45bccd4faf3c2a939c34135b9ecc7ca
7
+ data.tar.gz: 1d021c3b6eea6eacc2ac7e9081fe079a5bcf454fbba2ada078b1e42b14675503c01065524ae84eaa948f7e7f0a78c2547e920e297f1197747313cdc07a41c44a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ## edge (upcoming 0.7)
2
2
 
3
+ * Stop keyword-arg variable names leaking to global javascript scope
4
+
3
5
  * `Class#native_class` now also exposes `MyClass.new` (Ruby) as `Opal.global.MyClass.new()` (JS)
4
6
 
5
7
  * Add CRuby (MRI) tests harness to start checking Opal against them too.
data/lib/opal/builder.rb CHANGED
@@ -121,7 +121,7 @@ module Opal
121
121
  processed << asset
122
122
  end
123
123
 
124
- def process_requires(source_filename, requires, options)
124
+ def process_requires(filename, requires, options)
125
125
  requires.map { |r| process_require(r, options) }
126
126
  rescue MissingRequire => error
127
127
  raise error, "A file required by #{filename.inspect} wasn't found.\n#{error.message}"
@@ -180,18 +180,21 @@ module Opal
180
180
  when :kwoptarg
181
181
  arg_name = kwarg[1]
182
182
  var_name = variable(arg_name.to_s)
183
+ add_local var_name
183
184
  line "if ((#{var_name} = $kwargs.smap['#{arg_name}']) == null) {"
184
185
  line " #{var_name} = ", expr(kwarg[2])
185
186
  line "}"
186
187
  when :kwarg
187
188
  arg_name = kwarg[1]
188
189
  var_name = variable(arg_name.to_s)
190
+ add_local var_name
189
191
  line "if ((#{var_name} = $kwargs.smap['#{arg_name}']) == null) {"
190
192
  line " throw new Error('expecting keyword arg: #{arg_name}')"
191
193
  line "}"
192
194
  when :kwrestarg
193
195
  arg_name = kwarg[1]
194
196
  var_name = variable(arg_name.to_s)
197
+ add_local var_name
195
198
 
196
199
  kwarg_names = keyword_args.select do |kw|
197
200
  [:kwoptarg, :kwarg].include? kw.first
data/lib/opal/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opal
2
- VERSION = '0.7.0.rc1'
2
+ VERSION = '0.7.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.rc1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Beynon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sourcemap
@@ -738,9 +738,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
738
738
  version: '0'
739
739
  required_rubygems_version: !ruby/object:Gem::Requirement
740
740
  requirements:
741
- - - ">"
741
+ - - ">="
742
742
  - !ruby/object:Gem::Version
743
- version: 1.3.1
743
+ version: '0'
744
744
  requirements: []
745
745
  rubyforge_project:
746
746
  rubygems_version: 2.4.3