Opal v1.1.0 Release Notes

Release Date: 2021-02-19 // about 3 years ago
  • โž• Added

    • ๐Ÿ‘ Basic support for uplevel: keyword argument in Kernel#warn (#2006)
    • Added a #respond_to_missing? implementation for BasicObject, Delegator, OpenStruct, that's meant for future support in the Opal runtime, which currently ignores it (#2007)
    • Opal::Compiler#magic_comments that 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 for Opal.const_get_relative (#2038)
    • Opal.$$$ is now a shortcut for Opal.const_get_qualified (#2038)
    • โž• Added support for globalThis as the generic global object accessor (#2047)
    • Opal::Compiler#magic_comments that 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 for Opal.const_get_relative
    • Opal.$$$ is now a shortcut for Opal.const_get_qualified
    • 0๏ธโƒฃ 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#union as aliases respectively to Array#{-,&,|} (#2151)
    • Aliases filter{,!} to select{,!} throughout the corelib classes (#2151)
    • Enumerable#filter_map, Enumerable#tally (#2151)
    • Alias Kernel#then for Kernel#yield_self (#2151)
    • Method chaining: {Proc,Method}#{<<,>>} (#2151)
    • โž• Added Integer#to_d (#2006)
    • Added a compiler option use_strict which can also be set by the use_strict magic comment (#1959)
    • โž• Add --rbrequire (-q) option to opal command 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)
    • PathReader used to try to read missing files instead of respecting the missing_require_severity configuration 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_method can 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 for Opal.const_get_relative (#2038)
    • ๐Ÿšš Moved REPL implementation from bin/ to its own lib/ file as opal/repl.rb (#2048)
    • Encoding.default_external is 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#clamp to support a Range argument (#2151)
    • ๐Ÿ‘ #to_h method 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)
    • 0๏ธโƒฃ 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

    โœ‚ Removed

    • โœ‚ Removed special compilation for the Opal.truthy? and Opal.falsy? helpers (#2076)
    • โœ‚ Removed the deprecated tainting compiler config option (#2072)