elia
released this
Added
- Basic support for
uplevel:keyword argument inKernel#warn(#2006) - Added a
#respond_to_missing?implementation forBasicObject,Delegator,OpenStruct, that's meant for future support in the Opal runtime, which currently ignores it (#2007) Opal::Compiler#magic_commentsthat allows to access magic-comments format and converts it to a hash (#2038)- Use magic-comments to declare helpers required by the file (#2038)
Opal.$$is now a shortcut forOpal.const_get_relative(#2038)Opal.$$$is now a shortcut forOpal.const_get_qualified(#2038)- Added support for
globalThisas the generic global object accessor (#2047) Opal::Compiler#magic_commentsthat allows to access magic-comments format and converts it to a hash- Use magic-comments to declare helpers required by the file
Opal.$$is now a shortcut forOpal.const_get_relativeOpal.$$$is now a shortcut forOpal.const_get_qualified- Source-map support for Node.js in the default runner (#2045)
- SecureRandom#hex(n) (#2050)
- Added a generic implementation of Kernel#caller and #warn(uplevel:) that works with sourcemaps in Node.js and Chrome (#2065)
- Added support for numblocks
-> { _1 + _2 }.call(3, 4) # => 7(#2149) - Support
<internal:…>and<js:…>in stacktraces, like MRI we now distinguish internal lines from lib/app lines (#2154) Array#difference,Array#intersection,Array#unionas aliases respectively toArray#{-,&,|}(#2151)- Aliases
filter{,!}toselect{,!}throughout the corelib classes (#2151) Enumerable#filter_map,Enumerable#tally(#2151)- Alias
Kernel#thenforKernel#yield_self(#2151) - Method chaining:
{Proc,Method}#{<<,>>}(#2151) - Added Integer#to_d (#2006)
- Added a compiler option
use_strictwhich can also be set by theuse_strictmagic comment (#1959) - Add
--rbrequire (-q)option toopalcommand line executable (#2120)
Fixed
- Array#delete_if (#2069)
- Array#keep_if (#2069)
- Array#reject! (#2069)
- Array#select! (#2069)
- Struct#dup (#1995)
- Integer#gcdlcm (#1972)
- Enumerable#to_h (#1979)
- Enumerator#size (#1980)
- Enumerable#min (#1982)
- Enumerable#min_by (#1985)
- Enumerable#max_by (#1985)
- Set#intersect? (#1988)
- Set#disjoint? (#1988)
- Set#keep_if (#1987)
- Set#select! (#1987)
- Set#reject! (#1987)
- String#unicode_normalize (#2175)
- Module#alias_method (#1983)
- Enumerable#minmax_by (#1981)
- Enumerator#each_with_index (#1990)
- Range#== (#1992)
- Range#each (#1991)
- Enumerable#zip (#1986)
- String#getbyte (#2141)
- Struct#dup not copying
$$data(#1995) - Fixed usage of semicolon in single-line backticks (#2004)
- Module#attr with multiple arguments (#2003)
PathReaderused to try to read missing files instead of respecting themissing_require_severityconfiguration value (#2044)- Removed some unused variables from the runtime (#2052)
- Fixed a typo in the runtime (#2054)
- Fix Regexp interpolation, previously interpolating with other regexps was broken (#2062)
- Set match on StringScanner#skip and StringScanner#scan_until (#2061)
- Fix ruby 2.7 warnings (#2071)
- Improve the --help descriptions (#2146)
- Remove BasicObject#class (#2166)
- Time#strftime %j leading zeros (#2161)
- Fix
call { true or next }producing invalid code (#2160) define_methodcan now be called on the main object (#2029)- Fix nested for-loops (#2033)
- Fix Number#round for Integers (#2030)
- Fix parsing Unicode characters from Opal (#2073)
- Integer#===: improve Integer recognition (#2089)
- Regexp: ensure ignoreCase is never undefined (#2098)
- Hash#delete: ensure String keys are converted to values (#2106)
- Array#shift: improve performance on v8 >7.1 (#2115)
- Array#pop(1): improve performance (#2130)
- Object#pretty_inspect (#2139)
- Fix conversion from UTF-8 to bytes (#2138)
- Restore compatibility with Chrome 38, used by Cordova and many mobile browsers (#2109)
Changed
- Updated outdated parser version (#2013)
- Nashorn has been deprecated but GraalVM still supports it (#1997)
- "opal/mini" now includes "opal/io" (#2002)
- Regexps assigned to constants are now frozen (#2007)
Opal.$$changed from being the constant cache of Object to being a shortcut forOpal.const_get_relative(#2038)- Moved REPL implementation from bin/ to its own lib/ file as
opal/repl.rb(#2048) Encoding.default_externalis now initialized with__ENCODING__(#2072)- Keep the MersenneTwister implementation private (#2108)
- Change parser to 3.0 (#2148)
- Fix forwarding a rescued error to a global var:
rescue => $gvar(#2154) - Now using Parser v3.0 and targeting Ruby 3.0 (#2156)
Comparable#clampto support a Range argument (#2151)#to_hmethod to support a block (shortform for.map(&block).to_h) (#2151)- BigDecimal is now a subclass of Numeric (#2006)
- PP to be rebased on upstream Ruby version (#2083)
- String to report UTF-8 encoding by default, as MRI does (#2117)
- Don't output "Failed to load WithCLexer, using pure Ruby lexer" warning unless in $DEBUG mode (#2174)
Deprecated
- Requiring nodejs/stacktrace has been deprecated, source-maps are already
supported by the default Node.js runner or by requiring https://github.com/evanw/node-source-map-support
before loading code compiled by Opal (#2045)