opal 1.3.0 → 1.3.1
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 +4 -4
- data/CHANGELOG.md +14 -0
- data/UNRELEASED.md +7 -0
- data/docs/releasing.md +16 -1
- data/lib/opal/cli_runners/chrome.rb +4 -4
- data/lib/opal/nodes/call.rb +4 -2
- data/lib/opal/repl.rb +2 -1
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/array.rb +1 -1
- data/opal/corelib/binding.rb +5 -1
- data/opal/corelib/constants.rb +2 -2
- data/opal/corelib/proc.rb +4 -1
- data/opal/corelib/string.rb +1 -1
- data/spec/filters/bugs/kernel.rb +2 -0
- data/spec/opal/core/array/zip_spec.rb +12 -0
- data/spec/opal/core/string/scan_spec.rb +8 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a33a6b0ec566d750d22d1bca26dcad96c9410b6c9f009c2d576d5d034d78b76
|
4
|
+
data.tar.gz: cc9550e4097c954b66d556ed11a1cb90a88336383b4ff1fc8d732117f773117e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb47426dadf8b67198eaf7efcfb5b2d91bc1c567d34247fa170e8a4644236d308bcfabf53e8e428b64728feb81da6692325b9f4dd6d93ebf14a0f0345f020e80
|
7
|
+
data.tar.gz: b2bbd78addde393c3489fd4d55f3df1d259457415a1593c2a46343943ff227bde4b668a829a434ad57444284681591fab31dcd73e68c6f1acb3677b2c3496649
|
data/CHANGELOG.md
CHANGED
@@ -15,6 +15,20 @@ Changes are grouped as follows:
|
|
15
15
|
|
16
16
|
|
17
17
|
|
18
|
+
## [3.0.1](https://github.com/opal/opal/compare/v1.3.0...v3.0.1) - 2021-11-03
|
19
|
+
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
|
23
|
+
* Fix REPL if bundler environment isn't set ([#2338](https://github.com/opal/opal/pull/2338))
|
24
|
+
* Fix Chrome runner if bundler environment isn't set and make it work on other Unixes ([#2339](https://github.com/opal/opal/pull/2339))
|
25
|
+
* `Proc#binding` to return a binding if `Binding` is defined (#2341, #2340)
|
26
|
+
* `Array#zip` to correctly `yield` (#2342, #1611)
|
27
|
+
* `String#scan` to correctly `yield` (#2342, #1660)
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
18
32
|
## [1.3.0](https://github.com/opal/opal/compare/v1.2.0...v1.3.0) - 2021-10-27
|
19
33
|
|
20
34
|
|
data/UNRELEASED.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
### Added
|
2
2
|
### Fixed
|
3
|
+
|
4
|
+
* Fix REPL if bundler environment isn't set (#2338)
|
5
|
+
* Fix Chrome runner if bundler environment isn't set and make it work on other Unixes (#2339)
|
6
|
+
* `Proc#binding` to return a binding if `Binding` is defined (#2341, #2340)
|
7
|
+
* `Array#zip` to correctly `yield` (#2342, #1611)
|
8
|
+
* `String#scan` to correctly `yield` (#2342, #1660)
|
9
|
+
|
3
10
|
### Changed
|
4
11
|
### Deprecated
|
5
12
|
### Removed
|
data/docs/releasing.md
CHANGED
@@ -14,5 +14,20 @@ _This guide is a work-in-progress._
|
|
14
14
|
|
15
15
|
## The commit
|
16
16
|
|
17
|
-
- Commit the updated changelog along with the version bump using this
|
17
|
+
- Commit the updated changelog along with the version bump using this commit message:
|
18
18
|
"Release v1.2.3"
|
19
|
+
|
20
|
+
## Opal docs
|
21
|
+
|
22
|
+
- Open `opal-docs` and run `bin/build v1.2.3`
|
23
|
+
- Then run `bin/deploy`
|
24
|
+
|
25
|
+
## Opal site
|
26
|
+
|
27
|
+
- Open `opal.github.io` and update the opal version in the `Gemfile`
|
28
|
+
- run `bin/build`
|
29
|
+
- `git push` the latest changes
|
30
|
+
|
31
|
+
## Opal CDN
|
32
|
+
|
33
|
+
- Run `bin/release v1.2.3`
|
@@ -4,6 +4,7 @@ require 'shellwords'
|
|
4
4
|
require 'socket'
|
5
5
|
require 'timeout'
|
6
6
|
require 'tmpdir'
|
7
|
+
require 'rbconfig'
|
7
8
|
|
8
9
|
module Opal
|
9
10
|
module CliRunners
|
@@ -45,7 +46,8 @@ module Opal
|
|
45
46
|
}
|
46
47
|
|
47
48
|
cmd = [
|
48
|
-
|
49
|
+
RbConfig.ruby,
|
50
|
+
"#{__dir__}/../../../exe/opal",
|
49
51
|
'--no-exit',
|
50
52
|
'-I', __dir__,
|
51
53
|
'-r', 'source-map-support-node',
|
@@ -158,7 +160,7 @@ module Opal
|
|
158
160
|
end
|
159
161
|
when /darwin|mac os/
|
160
162
|
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
|
161
|
-
|
163
|
+
else
|
162
164
|
%w[
|
163
165
|
google-chrome-stable
|
164
166
|
chromium
|
@@ -169,8 +171,6 @@ module Opal
|
|
169
171
|
return name
|
170
172
|
end
|
171
173
|
raise 'Cannot find chrome executable'
|
172
|
-
when /solaris|bsd/
|
173
|
-
raise 'Headless chrome is supported only by Mac OS and Linux'
|
174
174
|
end
|
175
175
|
end
|
176
176
|
|
data/lib/opal/nodes/call.rb
CHANGED
@@ -385,7 +385,7 @@ module Opal
|
|
385
385
|
push ')' if push_nesting
|
386
386
|
end
|
387
387
|
|
388
|
-
# This can be refactored in terms of binding, but it would 'corelib/binding'
|
388
|
+
# This can be refactored in terms of binding, but it would need 'corelib/binding'
|
389
389
|
# to be required in existing code.
|
390
390
|
add_special :eval do |compile_default|
|
391
391
|
next compile_default.call if arglist.children.length != 1 || ![s(:self), nil].include?(recvr)
|
@@ -399,7 +399,9 @@ module Opal
|
|
399
399
|
push "self.$eval(#{temp}))"
|
400
400
|
end
|
401
401
|
|
402
|
-
add_special :binding do
|
402
|
+
add_special :binding do |compile_default|
|
403
|
+
next compile_default.call unless recvr.nil?
|
404
|
+
|
403
405
|
push "Opal.Binding.$new("
|
404
406
|
push " function($code, $value) {"
|
405
407
|
push " if (typeof $value === 'undefined') {"
|
data/lib/opal/repl.rb
CHANGED
@@ -4,6 +4,7 @@ require 'opal'
|
|
4
4
|
require 'securerandom'
|
5
5
|
require 'stringio'
|
6
6
|
require 'fileutils'
|
7
|
+
require 'rbconfig'
|
7
8
|
|
8
9
|
module Opal
|
9
10
|
class REPL
|
@@ -44,7 +45,7 @@ module Opal
|
|
44
45
|
def load_opal
|
45
46
|
runner = @argv.reject { |i| i == '--repl' }
|
46
47
|
runner += ['-e', 'require "opal/repl_js"']
|
47
|
-
runner =
|
48
|
+
runner = [RbConfig.ruby, "#{__dir__}/../../exe/opal"] + runner
|
48
49
|
|
49
50
|
@pipe = IO.popen(runner, 'r+',
|
50
51
|
# What I try to achieve here: let the runner ignore
|
data/lib/opal/version.rb
CHANGED
data/opal/corelib/array.rb
CHANGED
data/opal/corelib/binding.rb
CHANGED
data/opal/corelib/constants.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
RUBY_PLATFORM = 'opal'
|
2
2
|
RUBY_ENGINE = 'opal'
|
3
3
|
RUBY_VERSION = '3.0.2'
|
4
|
-
RUBY_ENGINE_VERSION = '1.3.
|
5
|
-
RUBY_RELEASE_DATE = '2021-
|
4
|
+
RUBY_ENGINE_VERSION = '1.3.1'
|
5
|
+
RUBY_RELEASE_DATE = '2021-11-03'
|
6
6
|
RUBY_PATCHLEVEL = 0
|
7
7
|
RUBY_REVISION = '0'
|
8
8
|
RUBY_COPYRIGHT = 'opal - Copyright (C) 2013-2021 Adam Beynon and the Opal contributors'
|
data/opal/corelib/proc.rb
CHANGED
data/opal/corelib/string.rb
CHANGED
@@ -1010,7 +1010,7 @@ class String < `String`
|
|
1010
1010
|
if (block === nil) {
|
1011
1011
|
match.length == 1 ? result.push(match[0]) : result.push(#{`match_data`.captures});
|
1012
1012
|
} else {
|
1013
|
-
match.length == 1 ? block
|
1013
|
+
match.length == 1 ? Opal.yield1(block, match[0]) : Opal.yield1(block, #{`match_data`.captures});
|
1014
1014
|
}
|
1015
1015
|
if (pattern.lastIndex === match.index) {
|
1016
1016
|
pattern.lastIndex += 1;
|
data/spec/filters/bugs/kernel.rb
CHANGED
@@ -70,7 +70,9 @@ opal_filter "Kernel" do
|
|
70
70
|
fails "Kernel#eval activates refinements from the binding" # NoMethodError: undefined method `refine' for #<Module:0x1ad8>
|
71
71
|
fails "Kernel#eval activates refinements from the eval scope" # NoMethodError: undefined method `refine' for #<Module:0x20d4>
|
72
72
|
fails "Kernel#eval allows a binding to be captured inside an eval"
|
73
|
+
fails "Kernel#eval allows creating a new class in a binding" # RuntimeError: Evaluation on a Proc#binding is not supported
|
73
74
|
fails "Kernel#eval can be aliased"
|
75
|
+
fails "Kernel#eval does not make Proc locals visible to evaluated code" # Expected NameError but got: RuntimeError (Evaluation on a Proc#binding is not supported)
|
74
76
|
fails "Kernel#eval does not share locals across eval scopes"
|
75
77
|
fails "Kernel#eval doesn't accept a Proc object as a binding"
|
76
78
|
fails "Kernel#eval evaluates string with given filename and negative linenumber" # NameError: uninitialized constant TOPLEVEL_BINDING
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia Schito
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ast
|
@@ -784,6 +784,7 @@ files:
|
|
784
784
|
- spec/opal/core/array/minus_spec.rb
|
785
785
|
- spec/opal/core/array/union_spec.rb
|
786
786
|
- spec/opal/core/array/uniq_spec.rb
|
787
|
+
- spec/opal/core/array/zip_spec.rb
|
787
788
|
- spec/opal/core/boolean_spec.rb
|
788
789
|
- spec/opal/core/class/inherited_spec.rb
|
789
790
|
- spec/opal/core/enumerable/all_break_spec.rb
|
@@ -866,6 +867,7 @@ files:
|
|
866
867
|
- spec/opal/core/runtime_spec.rb
|
867
868
|
- spec/opal/core/string/each_byte_spec.rb
|
868
869
|
- spec/opal/core/string/gsub_spec.rb
|
870
|
+
- spec/opal/core/string/scan_spec.rb
|
869
871
|
- spec/opal/core/string/subclassing_spec.rb
|
870
872
|
- spec/opal/core/string/to_sym_spec.rb
|
871
873
|
- spec/opal/core/string/unpack_spec.rb
|
@@ -1121,10 +1123,10 @@ licenses:
|
|
1121
1123
|
metadata:
|
1122
1124
|
homepage_uri: https://opalrb.com/
|
1123
1125
|
bug_tracker_uri: https://github.com/opal/opal/issues
|
1124
|
-
changelog_uri: https://github.com/opal/opal/blob/v1.3.
|
1125
|
-
readme_uri: https://github.com/opal/opal/blob/v1.3.
|
1126
|
-
api_documentation_uri: http://opalrb.com/docs/api/v1.3.
|
1127
|
-
guides_uri: http://opalrb.com/docs/guides/v1.3.
|
1126
|
+
changelog_uri: https://github.com/opal/opal/blob/v1.3.1/CHANGELOG.md
|
1127
|
+
readme_uri: https://github.com/opal/opal/blob/v1.3.1/README.md
|
1128
|
+
api_documentation_uri: http://opalrb.com/docs/api/v1.3.1/index.html
|
1129
|
+
guides_uri: http://opalrb.com/docs/guides/v1.3.1/index.html
|
1128
1130
|
chat_uri: https://gitter.im/opal/opal
|
1129
1131
|
source_code_uri: https://github.com/opal/opal
|
1130
1132
|
post_install_message:
|