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 +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/opal/builder.rb +1 -1
- data/lib/opal/nodes/def.rb +3 -0
- data/lib/opal/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a9bf851ab7303452422a1822f7a2f312f4b2797
|
4
|
+
data.tar.gz: 01582cdf5ce1c13f075e52f6fb2905b761817e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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}"
|
data/lib/opal/nodes/def.rb
CHANGED
@@ -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
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
|
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
|
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:
|
743
|
+
version: '0'
|
744
744
|
requirements: []
|
745
745
|
rubyforge_project:
|
746
746
|
rubygems_version: 2.4.3
|