opal

Ruby ♥︎ JavaScript

MIT License

Downloads
203
Stars
4.8K
Committers
128

Bot releases are hidden (Show)

opal -

Published by elia almost 3 years ago

Fixed

  • Update documentation (#2350)
  • Fix IO#gets getting an extra char under some circumstances (#2349)
  • Raise a TypeError instead of UndefinedMethod if not a string is passed to __send__ (#2346)
  • Do not modify $~ when calling String#scan from internal methods (#2353)
  • Stop interpreting falsey values as a missing constant in Module#const_get (#2354)
opal -

Published by elia almost 3 years ago

Fixed

  • Fix REPL if bundler environment isn't set (#2338)
  • Fix Chrome runner if bundler environment isn't set and make it work on other Unixes (#2339)
  • Proc#binding to return a binding if Binding is defined (#2341, #2340)
  • Array#zip to correctly yield (#2342, #1611)
  • String#scan to correctly yield (#2342, #1660)
opal -

Published by elia almost 3 years ago

Added

  • Add support for retry (#2264)
  • Modernize Exceptions (#2264)
    • Add #cause, #backtrace_locations, #full_message to Exception
    • Normalize backtraces across platforms
    • Add Thread::Backtrace::Location
    • Output Exception#full_message on uncaught exceptions (#2269)
  • TracePoint :class support (#2049)
  • Implement the Flip-Flop operators (#2261)
  • Add JS[] to access properties on the global object (#2259)
  • Add ENV.fetch to the Nodejs implementation of ENV (#2259)
  • Opal::Cache, an optional compiler cache (enabled by default) (#2242, #2278, #2329)
  • Alias for gvars, alias on main (#2270)
  • Support for GJS (GNOME's JavaScript runtime) runner (#2280)
  • Scope variables support for eval() (#2256)
  • Add support for Kernel#binding (#2256)
  • A (mostly) correct support for refinements (#2256)
  • Add support for ECMAScript modules with an --esm CLI option (#2286)
  • Implement Regexp#names and add named captures support (#2272)
  • REPL improvements: (#2285)
    • Colored output & history support
    • ls to show available constants and variable
  • Add Method#=== as an alias to Method#call, works the same as Proc#=== (#2305)
  • Add IO#gets and IO#read_proc along with other supporting methods (#2309)
    • Support #gets on most platforms, including browsers (via prompt)
    • Move the REPL to a --repl CLI option of the main executable
    • Completely refactor IO, now supporting methods like #each_line throughout the entire IO chain
    • Add a runner for MiniRacer (as miniracer)
    • Support Windows on the Chrome runner
    • Support Windows on the REPL
    • Platforms an IO implementations should either set IO#read_proc or overwrite IO#sysread
  • [experimental] Add support for JavaScript async/await (#2221)
    • Enable the feature by adding a magic comment: # await: true
    • The magic comment can be also used to mark specific method patterns to be awaited
      (e.g. # await: *_await, sleep will make any method ending in _await or named sleep to be awaited)
    • Add Kernel#__await__ as a bridge to the await keyword (inspired by CoffeeScript await support)
    • Require opal/await to get additional support
    • Read more on the newly added documentation page
  • Better interoperability between legacy Promise (v1) and native Promise (v2) (#2221)
    • Add PromiseV1 as an alias to the original (legacy) Promise class
    • Add #to_v1 and #to_v2 to both classes
    • Promise#to_n will convert it to a native Promise (v2)
  • Add Opal::Config.esm to enable/disable ES modules (#2316)
    • If Config.esm is enabled, SimpleServer does type="module"
    • Add new rack-esm example
  • Add a QuickJS (https://bellard.org/quickjs/) runner (#2331)
  • Add IO#fileno, Method#curry, Buffer#to_s, Pathname.pwd (#2332)
  • Add NodeJS support for ARGF, ENV.{inspect,to_h,to_hash,merge}, File.{delete,unlink}, Kernel#system, Kernel#`, Process::Status (#2332)
  • Introduce __dir__ support (#2323)
  • Full autoload support (#2323)
    • Now compatible with opal-zeitwerk and isomorfeus
    • Allow toplevel autoloads
    • Allow dynamic autoloads (e.g. can be hooked to fetch a URL upon autoload with a custom loader)
    • Allow overwriting require (e.g. like rubygems does)
    • Allow autoloading trees with require_tree "./foo", autoload: true
    • Add Module#autoload?
  • Autoload parts of the corelib (#2323)

Fixed

  • Fixed multiple line Regexp literal to not generate invalid syntax as JavaScript (#1616)
  • Fix Kernel#{throw,catch} along with UncaughtThrowError (#2264)
  • Update source-map-support to fix an off-by-one error (#2264)
  • Source map: lines should start from 1, not 0 (#2273)
  • Allow for multiple underscored args with the same name in strict mode (#2292)
  • Show instance variables in Kernel#inspect (#2285)
  • 0.digits was returning an empty array in strict mode (#2301)
  • Non Integer numbers were responding to #digits (#2301)
  • Correctly delete hash members when dealing with boxed strings (#2306)
  • Escape string components in interpolated strings (dstrs) correctly (#2308)
  • Don't try to return the JS debugger statement, just return nil (#2307)
  • Retain the - while stringifying -0.0 (#2304)
  • Fix super support for rest args and re-assignments with implicit arguments (#2315)
  • Fix calling Regexp#last_match when $~ is nil (#2328)
  • Windows support for chrome runner (#2324)
    • Use correct node separator for NODE_PATH on Windows
    • Pass dir and emulate exec a bit on Windows
    • Use Gem.win_platform?, match supported platform to ruby, simplify run
  • NodeJS: Drop the first -- argument in ARGV (#2332)
  • Fix Object#require not pointing to Kernel#require (#2323)

Changed

  • Fast-track bad constant names passed to Struct.new (#2259)
  • Renamed internal super related helpers,
    find_super_dispatcher is now find_super, find_iter_super_dispatcher is now find_block_super (#2090)
  • The opal-repl CLI now requires files to be passed with --require (or -r) instead of the bare filename (#2309)
  • Process is now a Module, not a Class - just like in MRI (#2332)
  • s = StringIO.new("a"); s << "b"; s.string now returns "b", like MRI, but Opal used to return "ab" (#2309)

Internal

  • Switch from jshint to ESLint (#2289)
  • Switch from UglifyJS to Terser (#2318)
  • [CI] Performance regression check (#2276, #2282)
opal -

Published by elia almost 3 years ago

Please refer to UNRELEASED.md

opal -

Published by elia about 3 years ago

Please refer to UNRELEASED.md

opal -

Published by elia about 3 years ago

Added

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

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)
  • Add regexp support to String#start_with (#2198)
  • String#bytes now works in strict mode (#2194)
  • Fix nested module inclusion (#2053)
  • SecureRandom is now cryptographically secure on most platforms (#2218, #2170)
  • Fix performance regression for Array#unshift on v8 > 7.1 (#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)
  • Fix class Class < superclass for invalid superclasses (#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)
  • Rework class variables to support inheritance correctly (#2251)
  • ISO-8859-1 and US-ASCII encodings are now separated as in MRI (#2235)
  • String#b no longer modifies object strings in-place (#2235)
  • Parser::Builder::Default.check_lvar_name patch (#2195)

Changed

  • String#unpack, Array#pack, String#chars, String#length, Number#chr, and (only partially) String#+ are now encoding aware (#2235)
  • String#inspect now uses \x for binary stirngs (#2235)
  • 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)
  • Array: difference, intersection, union now accept multiple arguments (#2237)

Deprecated

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

Removed

  • Removed support for the outdated c_lexer, it was optional and didn't work for the last few releases of parser (#2235)
opal -

Published by elia about 3 years ago

Added

  • Support for multiple arguments in Hash#{merge, merge!, update} (#2187)
  • Support for Ruby 3.0 forward arguments: def a(...) puts(...) end (#2153)
  • Support for beginless and endless ranges: (1..), (..1) (#2150)
  • Preliminary support for **nil argument - see #2240 to note limitations (#2152)
  • Support for Random::Formatters which add methods #{hex,base64,urlsafe_base64,uuid,random_float,random_number,alphanumeric} to Random and SecureRandom (#2218)
  • Basic support for ObjectSpace finalizers and ObjectSpace::WeakMap (#2247)
  • A more robust support for encodings (especially binary strings) (#2235)
  • Support for "\x80" syntax in String literals (#2235)
  • Added String#+@, String#-@ (#2235)
  • Support for begin <CODE> end while <CONDITION> (#2255)

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)
  • Add regexp support to String#start_with (#2198)
  • String#bytes now works in strict mode (#2194)
  • Fix nested module inclusion (#2053)
  • SecureRandom is now cryptographically secure on most platforms (#2218, #2170)
  • Fix performance regression for Array#unshift on v8 > 7.1 (#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)
  • Fix class Class < superclass for invalid superclasses (#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)
  • Rework class variables to support inheritance correctly (#2251)
  • ISO-8859-1 and US-ASCII encodings are now separated as in MRI (#2235)
  • String#b no longer modifies object strings in-place (#2235)

Changed

  • String#unpack, Array#pack, String#chars, String#length, Number#chr, and (only partially) String#+ are now encoding aware (#2235)
  • String#inspect now uses \x for binary stirngs (#2235)
  • 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)
  • Array: difference, intersection, union now accept multiple arguments (#2237)

Deprecated

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

Removed

  • Removed support for the outdated c_lexer, it was optional and didn't work for the last few releases of parser (#2235)
opal -

Published by elia over 3 years ago

Fixed

  • The default runner (nodejs) wasn't starting to a bad require in the improved stack-traces (#2182)
opal -

Published by elia over 3 years ago

opal -

Published by elia over 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
  • 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)
  • 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)
opal -

Published by elia over 3 years ago

opal -

Published by elia almost 4 years ago

Fixed

  • [Backported] Add --rbrequire (-q) option to opal cmdline tool (#2120)
  • Improve the --help descriptions (#2146)
opal -

Published by elia almost 4 years ago

Fixed

  • [Backported] Using the --map / -P CLI option was only working in conjunction with other options (#1974)
opal -

Published by elia over 4 years ago

Fixed

  • Fixed compiling code with Unicode chars from Opal with opal-parser (#2074)
opal -

Published by elia almost 5 years ago

  • Increase the timeout for starting Chrome within the Chrome runner (#2037)
  • Run the Opal code within the body inside Chrome runner, it fixes an issue in opal-rspec (#2037)
opal - v1.0.1

Published by elia almost 5 years ago

Changed

  • Relaxed parser version requirement (#2013)
opal -

Published by elia over 5 years ago

Added

  • Added Module#prepend and completely overhauled the module and class inheritance system (#1826)

  • Methods and properties are now assigned with Object.defineProperty() as non-enumerable (#1821)

  • Backtrace now includes the location inside the source file for syntax errors (#1814)

  • Added support for a faster C-implemented lexer, it's enough to add gem 'c_lexer to the Gemfile (#1806)

  • Added Date#to_n that returns the JavaScript Date object (in native.rb). (#1779, #1792)

  • Added Array#pack (supports only C, S, L, Q, c, s, l, q, A, a formats). (#1723)

  • Added String#unpack (supports only C, S, L, Q, S>, L>, Q>, c, s, l, q, n, N, v, V, U, w, A, a, Z, B, b, H, h, u, M, m formats). (#1723)

  • Added File#symlink? for Node.js. (#1725)

  • Added Dir#glob for Node.js (does not support flags). (#1727)

  • Added support for a static folder in the "server" CLI runner via the OPAL_CLI_RUNNERS_SERVER_STATIC_FOLDER env var

  • Added the CLI option --runner-options that allows passing arbitrary options to the selected runner, currently the only runner making use of them is server accepting port and static_folder

  • Added a short helper to navigate constants manually: E.g. Opal.$$.Regexp.$$.IGNORECASE (see docs for "Compiled Ruby")

  • Added initial support for OpenURI module (using XMLHttpRequest on browser and xmlhttprequest on Node). (#1735)

  • Added String#prepend to the list of unsupported methods (because String are immutable in JavaScript)

  • Added methods (most introduced in 2.4/2.5):

    • Array#prepend (#1757)
    • Array#append (#1757)
    • Array#max (#1757)
    • Array#min (#1757)
    • Complex#finite? (#1757)
    • Complex#infinite? (#1757)
    • Complex#infinite? (#1757)
    • Date#to_time (#1757)
    • Date#next_year (#1885)
    • Date#prev_year (#1885)
    • Hash#slice (#1757)
    • Hash#transform_keys (#1757)
    • Hash#transform_keys! (#1757)
    • Numeric#finite? (#1757)
    • Numeric#infinite? (#1757)
    • Numeric#infinite? (#1757)
    • Integer#allbits? (#1757)
    • Integer#anybits? (#1757)
    • Integer#digits (#1757)
    • Integer#nobits? (#1757)
    • Integer#pow (#1757)
    • Integer#remainder (#1757)
    • Integer.sqrt (#1757)
    • Random.urandom (#1757)
    • String#delete_prefix (#1757)
    • String#delete_suffix (#1757)
    • String#casecmp? (#1757)
    • Kernel#yield_self (#1757)
    • String#unpack1 (#1757)
    • String#to_r (#1842)
    • String#to_c (#1842)
    • String#match? (#1842)
    • String#unicode_normalize returns self (#1842)
    • String#unicode_normalized? returns true (#1842)
    • String#[]= throws NotImplementedError(#1836)
  • Added support of the pattern argument for Enumerable#all?, Enumerable#any?, Enumerable#none?. (#1757)

  • Added ndigits option support to Number#floor, Number#ceil, Number#truncate. (#1757)

  • Added key and receiver attributes to the KeyError. (#1757)

  • Extended Struct.new to support keyword_init option. (#1757)

  • Added a new Opal::Config.missing_require_severity option and relative --missing-require CLI flag. This option will command how the builder will behave when a required file is missing. Previously the behavior was undefined and partly controlled by dynamic_require_severity. Not to be confused with the runtime config option Opal.config.missing_require_severity; which controls the runtime behavior.

  • Added Matrix (along with the internal MRI utility E2MM)

  • Use shorter helpers for constant lookups, $$ for relative (nesting) lookups and $$$ for absolute (qualified) lookups

  • Add support for the Mersenne Twister random generator, the same used by CRuby/MRI (#657 & #1891)

  • [Nodejs] Added support for binary data in OpenURI (#1911, #1920)

  • [Nodejs] Added support for binary data in File#read (#1919, #1921)

  • [Nodejs] Added support for File#readlines (#1882)

  • [Nodejs] Added support for ENV#[], ENV#[]=, ENV#key?, ENV#has_key?, ENV#include?, ENV#member?, ENV#empty?, ENV#keys, ENV#delete and ENV#to_s (#1928)

Changed

  • BREAKING The dot (.) character is no longer replaced with [\s\S] in a multiline regexp passed to Regexp#match and Regexp#match? (#1796, #1795)
    • You're advised to always use [\s\S] instead of . in a multiline regexp, which is portable between Ruby and JavaScript
  • BREAKING Kernel#format (and sprintf alias) are now in a dedicated module corelib/kernel/format and available exclusively in opal (#1930)
    • Previously the methods were part of the corelib/kernel module and available in both opal and opal/mini
  • Filename extensions are no longer stripped from filenames internally, resulting in better error reporting (#1804)
  • The internal API for CLI runners has changed, now it's just a callable object
  • The --map CLI option now works only in conjunction with --compile (or --runner compiler)
  • The node CLI runner now adds its NODE_PATH entry instead of replacing the ENV var altogether
  • Added --disable-web-security option flag to the Chrome headless runner to be able to do XMLHttpRequest
  • Migrated parser to 2.5. Bump RUBY_VERSION to 2.5.0.
  • Exceptions raised during the compilation now add to the backtrace the current location of the opal file if available (#1814).
  • Better use of displayName on functions and methods and more readable temp variable names (#1910)
  • Source-maps are now inlined and already contain sources, incredibly more stable and precise (#1856)

Deprecated

  • The CLI --server-port 1234 option is now deprecated in favor of using --runner-options='{"port": 1234}'
  • Including ::Native is now deprecated because it generates conflicts with core classes in constant lookups (both Native::Object and Native::Array exist). Instead Native::Werapper should be used.
  • Using node_require 'my_module' to access the native require() function in Node.js is deprecated in favor of `require('my_module')` because static builders need to parse the call in order to function (#1886).

Removed

  • The node CLI runner no longer supports passing extra node options via the NODE_OPT env var, instead Node.js natively supports the NODE_OPTIONS env var.
  • The gem "hike" is no longer an external dependency and is now an internal dependency available as Opal::Hike (#1881)
  • Removed the internal Opal class Marshal::BinaryString (#1914)
  • Removed Racc, as it's now replaced by the parser gem (#1880)

Fixed

  • Fix handling of trailing semicolons and JavaScript returns inside x-strings, the behavior is now well defined and covered by proper specs (#1776)
  • Fixed singleton method definition to return method name. (#1757)
  • Allow passing number of months to Date#next_month and Date#prev_month. (#1757)
  • Fixed pattern argument handling for Enumerable#grep and Enumerable#grep_v. (#1757)
  • Raise ArgumentError instead of TypeError from Numeric#step when step is not a number. (#1757)
  • At run-time LoadError wasn't being raised even with Opal.config.missing_require_severity; set to 'error'.
  • Fixed Kernel#public_methods to return instance methods if the argument is set to false. (#1848)
  • Fixed an issue in String#gsub that made it start an infinite loop when used recursively. (#1879)
  • Kernel#exit was using status 0 when a number or a generic object was provided, now accepts numbers and tries to convert objects with #to_int (#1898, #1808).
  • Fixed metaclass inheritance in subclasses of Module (#1901)
  • Method#to_proc now correctly sets parameters and arity on the resulting Proc (#1903)
  • Fixed bridged classes having their prototype removed from the original chain by separating them from the Ruby class (#1909)
  • Improve String#to_proc performance (#1888)
  • Fixed/updated the examples (#1887)
  • Opal.ancestors() now returns false for when provided with JS-falsy objects (#1839)
  • When subclassing now the constant is set before calling ::inherited (#1838)
  • String#to_sym now returns the string literal (#1835)
  • String#center now correctly checks length (#1833)
  • redo inside while now works properly (#1820)
  • Fixed compilation of empty/whitespace-only x-strings (#1811)
  • Fix ||= assignments on constants when the constant is not yet defined (#1935)
  • Fix String#chomp to return an empty String when arg == self (#1936)
  • Fix methods of Comparable when <=> does not return Numeric (#1945)
  • Fix Class#native_alias error message (#1946)
  • Fix gmt_offset (alias utc_offset) should return 0 if the date is UTC (#1941)
  • exceptionDetails.stackTrace can be undefined (#1955)
  • Implement String#each_codepoint and String#codepoints (#1944, #1947)
  • [internal] Terminate statement with semi-colon and remove unecessary semi-colon (#1948)
  • Some steps toward "strict mode" (#1953)
  • Preserve Exception.stack, in some cases the backtrace was lost (#1963)
  • Make String#ascii_only? a little less wrong (#1951)
  • Minor fixes to ::Native (#1957)
opal -

Published by elia over 5 years ago

opal -

Published by elia almost 6 years ago

Fixed

  • Kernel#exit was using status 0 when a number or a generic object was provided, now accepts numbers and tries to convert objects with #to_int.
opal -

Published by elia about 6 years ago

  • Implement attr_reader/writer/accessor for dynamic uses
  • Hash internals update