Bot releases are visible (Hide)
Hash
is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash
now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash
data structures will need to be updated.
Interacting with Hash
from JavaScript
is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
PromiseV2#always
just like PromiseV1#always
does it (#2579)#hash
now returns integers (#2582)Range#include?
/member?
/cover?
/===
(#2598)Module#define_method
more compatible with CRuby (#2593)Hash#clone
must freeze clone if original is frozen, but Hash#dup
must not (#2603)Kernel#Float
with exception:
option (#2532)Kernel#Integer
with exception:
option (#2531)String#split
with limit and capturing regexp (#2544)switch
with Object-wrapped values (#2542)nodejs/yaml
functionality (#2551)Range#size
edge cases (#2541)String#object_id
, String#__id__
, String#hash
to match CRuby's behavior (#2576)SimpleServer
for rack 3.0 compatibility (#2578)Module#clone
and Module#dup
to properly copy methods (#2572)</script>
(#2581)$truthy
when left hand side of a comparison is self
(#2596)return
/break
should raise LocalJumpError
(#2591)Kernel#eval
(#2534)CGI::Util#escapeURIComponent
and CGI::Util#unescapeURIComponent
(#2566)CGI::Util
implement additional methods (#2601)Hash
is now bridged to JavaScript Map
and support for non-symbol keys in keyword arguments (#2568)Array#intersect?
and #intersection
(#2533)Proc#call
: Refactor for performance (#2541)#to_a
(#2541)#collect
/#map
(#2541)String#split
and String#start_with
(#2560)$@
dynamically (#2592)$prop
helper (#2597)Array.push()
performance when pushing many items (#2565)Opal.instance_methods
(#2600)Hash
is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash
now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash
data structures will need to be updated.
Interacting with Hash
from JavaScript
is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
PromiseV2#always
just like PromiseV1#always
does it (#2579)#hash
now returns integers #2582)Kernel#Float
with exception:
option (#2532)Kernel#Integer
with exception:
option (#2531)String#split
with limit and capturing regexp (#2544)switch
with Object-wrapped values (#2542)nodejs/yaml
functionality (#2551)Range#size
edge cases (#2541)String#object_id
, String#__id__
, String#hash
to match CRuby's behavior (#2576)SimpleServer
for rack 3.0 compatibility (#2578)Module#clone
and Module#dup
to properly copy methods (#2572)</script>
(#2581)$truthy
when left hand side of a comparison is self
(#2596)return
/break
should raise LocalJumpError
(#2591)Kernel#eval
(#2534)CGI::Util#escapeURIComponent
and CGI::Util#unescapeURIComponent
(#2566)Hash
is now bridged to JavaScript Map
and support for non-symbol keys in keyword arguments (#2568)Array#intersect?
and #intersection
(#2533)Proc#call
: Refactor for performance (#2541)#to_a
(#2541)#collect
/#map
(#2541)String#split
and String#start_with
(#2560)$@
dynamically (#2592)$prop
helper (#2597)Array.push()
performance when pushing many items (#2565)Hash
is now bridged to JavaScript Map
This change brings a lot of benefits, but also some incompatibilities. The main benefit is that Hash
now is both more performant and relies on native JavaScript capabilities.
This improves interoperability with JavaScript. As a downside, applications reaching for internal Hash
data structures will need to be updated.
Interacting with Hash
from JavaScript
is easier than ever:
hash = `new Map([['a', 1], ['b', 2]])`
hash # => {a: 1, b: 2}
`console.log(hash)` # => Map(2) {"a" => 1, "b" => 2}
`hash.get('a')` # => 1
`hash.set('c', 3)`
hash # => {a: 1, b: 2, c: 3}
hash.keys # => ["a", "b", "c"]
hash.values # => [1, 2, 3]
This release brings a lot of performance improvements, our tests on Asciidoctor show a 25% improvement in performance, but we've seen up to 66% performance improvement on some applications.
Kernel#Float
with exception:
option (#2532)Kernel#Integer
with exception:
option (#2531)String#split
with limit and capturing regexp (#2544)switch
with Object-wrapped values (#2542)nodejs/yaml
functionality (#2551)Range#size
edge cases (#2541)Kernel#eval
(#2534)CGI::Util#escapeURIComponent
and CGI::Util#unescapeURIComponent
(#2566)Hash
is now bridged to JavaScript Map
and support for non-symbol keys in keyword arguments (#2568)Array#intersect?
and #intersection
(#2533)Proc#call
: Refactor for performance (#2541)#to_a
(#2541)#collect
/#map
(#2541)String#split
and String#start_with
(#2560)Published by elia over 1 year ago
--watch
ignoring some directories (e.g. tmp
) (#2509)Published by elia almost 2 years ago
Set
now part of the corelibcall(**, &)
Refinement#refined_class
has been addedModule#refinements
has been addedModule#const_added
has been addedProc#parameters
now accepts lambda keywordClass#attached_object
has been added, inverse of singleton_class
Hash#shift
now returns nil
instead of passing nil
to the default_proc
--watch
and --output
options to the CLI for live compilation (#2485)'$'+name
with a cached helper, saving about 2% in performance (#2481)Set
now part of the corelibcall(**, &)
Refinement#refined_class
has been addedModule#refinements
has been addedModule#const_added
has been addedProc#parameters
now accepts lambda keywordClass#attached_object
has been added, inverse of singleton_class
Hash#shift
now returns nil
instead of passing nil
to the default_proc
--watch
and --output
options to the CLI for live compilation (#2485)'$'+name
with a cached helper, saving about 2% in performance (#2481)performance:compare
CI check (#2450)#freeze
and #frozen?
(#2444, #2468)Proc#source_location
(#2440)Kernel#caller_locations
(#2440)Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)Opal::BuilderProcessors::RubyERBProcessor
(#2470)break
/ next
/ retry
/ … (#2357)String#length
is now available when using opal/mini
(#2438)Enumerable#collect_concat
and #flat_map
implementation (#2440)being/end
returning a case/when
(#2459).sourcesContent
of source maps (#2451)gets&.chomp
(#2473)var constructor
in allocate_class
(#2452)performance:compare
asset size calculation (#2457)performance:compare
CI check (#2450)#freeze
and #frozen?
(#2444, #2468)Proc#source_location
(#2440)Kernel#caller_locations
(#2440)Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454, #2469, #2475)Opal::BuilderProcessors::RubyERBProcessor
(#2470)break
/ next
/ retry
/ … (#2357)String#length
is now available when using opal/mini
(#2438)Enumerable#collect_concat
and #flat_map
implementation (#2440)being/end
returning a case/when
(#2459).sourcesContent
of source maps (#2451)gets&.chomp
(#2473)var constructor
in allocate_class
(#2452)performance:compare
asset size calculation (#2457)performance:compare
CI check (#2450)#freeze
and #frozen?
(#2444, #2468)Proc#source_location
(#2440)Kernel#caller_locations
(#2440)Opal::Builder::Prefork
for blazingly fast multicore compilation times (#2263, #2462, #2454)break
/ next
/ retry
/ … (#2357)String#length
is now available when using opal/mini
(#2438)Enumerable#collect_concat
and #flat_map
implementation (#2440)being/end
returning a case/when
(#2459).sourcesContent
of source maps (#2451)var constructor
in allocate_class
(#2452)performance:compare
asset size calculation (#2457)Published by elia over 2 years ago
Time.new
not depend on Date.prototype.getTimezoneOffset()
(#2426)Hash#each_value
if keys get deleted during loop (#2427)Full Changelog: https://github.com/opal/opal/compare/v1.5.0...v1.5.1
Published by elia over 2 years ago
Number#prev_float
/#next_float
by @takaram in https://github.com/opal/opal/pull/2404
binding.irb
anywhere in the code, for both browsers and node by @hmdne in https://github.com/opal/opal/pull/2392 and https://github.com/opal/opal/pull/2408
URI.decode_www_form
by @HoneyryderChuck in https://github.com/opal/opal/pull/2387
Math
IE11-supporting polyfills to a separate file by @hmdne in https://github.com/opal/opal/pull/2395
String
methods always return Strings even when overloaded by @hmdne in https://github.com/opal/opal/pull/2413
alias
calls will not add the "old name" method to the list of stubs for method missingfoo&.bar = 123
Integer
, String
, and calling the designed coertion methodArray#[]=
by moving the implementation to JavaScript and inlining type checkscase
statements as switch
whenever possible by @hmdne in https://github.com/opal/opal/pull/2411
Regexp.new
, replace \A
to ^
and \z
to $
by @ysakasin in https://github.com/opal/opal/pull/2079
Hash#each
and Hash#each_key
if keys get deleted during the loop by @janbiedermann in https://github.com/opal/opal/pull/2403
String#to_proc
and method_missing
compatibility by @hmdne in https://github.com/opal/opal/pull/2418
Full Changelog: https://github.com/opal/opal/compare/v1.4.1...v1.5.0
chomp:
option for String#each_line
and #lines
(#2355)Array#intersect?
String#strip
and String#lstrip
to also remove NUL bytesInteger.try_convert
public
, private
, protected
, module_function
now return their argumentsClass#descendants
, Class#subclasses
Kernel#local_variables
/(?<b>a)/ =~ 'a'
=> b = 'a'
)NIL
, TRUE
, FALSE
constantsString#unpack
and String#unpack1
to support an offset:
kwargMatchData#match
, MatchData#match_length
Enumerable#tally
to support an optional hash accumulatorEnumerable#each_{cons,slice}
to return selfEnumerable#compact
Refinement
becomes its own class nowStruct#keyword_init?
Enumerator::ArithmeticSequence
Enumerator::Chain
Enumerator#+
to create Enumerator::Chain
sEnumerator#{rewind,peek,peek_values,next,next_values}
ArithmeticSequences
String#[]
, Array#[]
, Array#[]=
, Array#fill
, Array#values_at
Range#step
and Numeric#step
return an ArithmeticSequence
when Numeric
values are in playRange#%
Enumerator::Yielder#to_proc
UnboundMethod#bind_call
{Kernel,BasicObject}#{inspect,p,pp,method_missing}
may work with JS native values now, also they now correctly report cyclesEnumerable#sum
uses Kahan's summation algorithm to reduce error with floating point valuesFile.dirname
supports a new level
argumentoptparse
and shellwords
(#2326)bin/opal
with Opal (#2326)Array#drop
(#2371)File.absolute_path
(#2372)IO#puts
edge cases (no args, empty array, nested array, …) (#2372)Kernel
, BasicObject
, Boolean
will never return boxed values anymore (#2293)
false.tap{}
will now correctly return a JS value of false
, not Object(false)
<<~END
strings anymore (#2364)==
, !=
and ===
changed their semantics slightly: it's impossible to monkey patch those calls for String
and Number
, but on other classes they can now return nil
and it will be handled correctly!
changed their semantics slightly: it's impossible to monkey patch this call for Boolean
or NilClass
.stdlib/nodejs
folder (#2374)
nodejs/base
with just I/O, exit, and ARGV managementProcess::Status
to corelibPlease refer to UNRELEASED.md.