[ANN] opal 1.2.0 released

opal version 1.2.0 has been released!

* home: https://opalrb.com/
* github: GitHub - opal/opal: Ruby ♥︎ JavaScript
* release blog post: Opal 1.2

opal is a Ruby to JavaScript compiler, a Ruby runtime in JavaScript and an idiomatic Ruby interface to a web browser and Node.js.

opal is tested with MSpec for the highest level of compatibility with MRI. It allows you to write complex web application frontends with not a single line of JavaScript. This release is mostly focused on Ruby 3.0 language support. This release marks an 11th year of development.

    1.2.0 <https://github.com/opal/opal/compare/v1.1.1...1.2.0> - 2021-07-28

      <opal/CHANGELOG.md at master · opal/opal · GitHub>Added

  * Support for multiple arguments in Hash#{merge, merge!, update}
    (#2187 <Update Hash#{merge, merge!, update} as taking multiple arguments by kachick · Pull Request #2187 · opal/opal · GitH>)
  * Support for Ruby 3.0 forward arguments: |def a(...) puts(...) end|
    (#2153 <Parser 3.0: Forward arguments support: def a(...); puts(...); end by hmdne · Pull Request #2153 · opal/opal · GitHu>)
  * Support for beginless and endless ranges: |(1..)|, |(..1)| (#2150
    <Parser 3.0: Support beginless and endless ranges by hmdne · Pull Request #2150 · opal/opal · GitHub>)
  * Preliminary support for |**nil| argument - see #2240 to note
    limitations (#2152 <Parser 3.0: kwnilargs (**nil) support by hmdne · Pull Request #2152 · opal/opal · GitHub>)
  * Support for |Random::Formatters| which add methods
    >#{hex,base64,urlsafe_base64,uuid,random_float,random_number,alphanumeric}|
    to |Random| and |SecureRandom| (#2218
    <A proper SecureRandom support + Random::Formatter module by hmdne · Pull Request #2218 · opal/opal · GitHub>)
  * Basic support for ObjectSpace finalizers and ObjectSpace::WeakMap
    (#2247 <ObjectSpace & ObjectSpace::WeakMap by hmdne · Pull Request #2247 · opal/opal · GitHub>)
  * A more robust support for encodings (especially binary strings)
    (#2235 <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * Support for |"\x80"| syntax in String literals (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * Added |String#+@|, |String#-@| (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * Support for |begin <CODE> end while <CONDITION>| (#2255
    <Implement begin .. end while by hmdne · Pull Request #2255 · opal/opal · GitHub>)
  * Added Hash#except and |Hash#except!| (#2243
    <Parser 3.0: Implement pattern matching. by hmdne · Pull Request #2243 · opal/opal · GitHub>)
  * Parser 3.0: Implement pattern matching (as part of this
    >{Array,Hash,Struct}#{deconstruct,deconstruct_keys} methods were
    added)| (#2243 <Parser 3.0: Implement pattern matching. by hmdne · Pull Request #2243 · opal/opal · GitHub>)
  * [experimental] Reimplement Promise to make it bridged with JS native
    Promise, this new implementation can be used by requiring
    >promise/v2| (#2220 <Reimplement Promise to make it bridged with JS native Promise by hmdne · Pull Request #2220 · opal/opal · GitHub</t>)

      <opal/CHANGELOG.md at master · opal/opal · GitHub>

      Fixed

  * Encoding lookup was working only with uppercase names, not giving
    any errors for wrong ones (#2181, #2183, #2190)
  * Fix |Number#to_i| with huge number (#2191
    <Fix Number#to_i with huge number by ysakasin · Pull Request #2191 · opal/opal · GitHub>)
  * Add regexp support to |String#start_with| (#2198
    <Implement String#start_with with a regexp argument by ysakasin · Pull Request #2198 · opal/opal · GitHub>)
  * |String#bytes| now works in strict mode (#2194
    <Fix String#bytes on strict mode by Mogztter · Pull Request #2194 · opal/opal · GitHub>)
  * Fix nested module inclusion (#2053
    <https://github.com/opal/opal/pull/2053>)
  * SecureRandom is now cryptographically secure on most platforms
    (#2218, #2170)
  * Fix performance regression for |Array#unshift| on v8 > 7.1 (#2116
    <https://github.com/opal/opal/pull/2116>)
  * String subclasses now call |#initialize| with multiple arguments
    correctly (with a limitation caused by the String immutability
    issue, that a source string must be the first argument and
    >#initialize| can't change its value) (#2238, #2185)
  * Number#step is moved to Numeric (#2100
    <https://github.com/opal/opal/pull/2100>)
  * Fix class Class < superclass for invalid superclasses (#2123
    <https://github.com/opal/opal/pull/2123>)
  * Fix |String#unpack("U*")| on binary strings with latin1 high
    characters, fix performance regression on that call (#2235, #2189,
    #2129, #2099, #2094, #2000, #2128)
  * Fix |String#to_json| output on some edge cases (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * Rework class variables to support inheritance correctly (#2251
    <https://github.com/opal/opal/pull/2251>)
  * ISO-8859-1 and US-ASCII encodings are now separated as in MRI (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * |String#b| no longer modifies object strings in-place (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * Parser::Builder::Default.check_lvar_name patch (#2195
    <https://github.com/opal/opal/pull/2195>)

      <https://github.com/opal/opal/blob/master/CHANGELOG.md#changed>

      Changed

  * |String#unpack|, |Array#pack|, |String#chars|, |String#length|,
    >Number#chr|, and (only partially) |String#+| are now encoding aware
    (#2235 <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * |String#inspect| now uses |\x| for binary stirngs (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)
  * |if RUBY_ENGINE == "opal"| and friends are now outputing less JS
    code (#2159, #1965)
  * |Array|: |to_a|, |slice|/|[]|, |uniq|, |*|, |difference|/|-|,
    >intersection>/|&|, |union|/|||, flatten now return Array, not a
    subclass, as Ruby 3.0 does (#2237
    <https://github.com/opal/opal/pull/2237>)
  * |Array|: |difference|, |intersection|, |union| now accept multiple
    arguments (#2237 <https://github.com/opal/opal/pull/2237>)

      <https://github.com/opal/opal/blob/master/CHANGELOG.md#deprecated>

      Deprecated

  * Stopped testing Opal on Ruby 2.5 since it reached EOL.

      <https://github.com/opal/opal/blob/master/CHANGELOG.md#removed>

      Removed

  * Removed support for the outdated |c_lexer|, it was optional and
    didn't work for the last few releases of parser (#2235
    <Correct the utf-8 unpack implementation by hmdne · Pull Request #2235 · opal/opal · GitHub>)

1 Like