Skip to content

Commit 7193406

Browse files
seanmakesgamesnightpoollloekiSamSaffron
authored
Update to libv8-node 17.x Take 2 (#271)
* Upgrade to v8 9.6.180.15 / node 17.3.1 * bump libv8-node version * Split locale tests for regression testing * Reinstate aarch64 musl CI testing * Add Ruby 3.2 to CI --------- Co-authored-by: nightpool <eg1290@gmail.com> Co-authored-by: Loic Nageleisen <loic.nageleisen@gmail.com> Co-authored-by: Sam <sam.saffron@gmail.com>
1 parent 46fe327 commit 7193406

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ jobs:
7777
libc:
7878
- "gnu"
7979
- "musl"
80-
exclude:
81-
# there's no libv8-node (v16) for aarch64-linux-musl at the moment
82-
- platform: "arm64"
83-
libc: "musl"
8480

8581
name: linux-${{ matrix.platform }} - ruby-${{ matrix.ruby }} - ${{ matrix.libc }}
8682
runs-on: ubuntu-20.04

ext/mini_racer_extension/mini_racer_extension.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static VALUE convert_v8_to_ruby(Isolate* isolate, Local<Context> context,
658658

659659
if (value->IsSymbol()) {
660660
v8::String::Utf8Value symbol_name(isolate,
661-
Local<Symbol>::Cast(value)->Name());
661+
Local<Symbol>::Cast(value)->Description(isolate));
662662

663663
VALUE str_symbol = rb_utf8_str_new(*symbol_name, symbol_name.length());
664664

lib/mini_racer/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

33
module MiniRacer
4-
VERSION = "0.6.4"
5-
LIBV8_NODE_VERSION = "~> 16.19.0.0"
4+
VERSION = "0.6.5"
5+
LIBV8_NODE_VERSION = "~> 17.9.1.0"
66
end

test/mini_racer_test.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,26 @@ class MiniRacerTest < Minitest::Test
88
# see `test_platform_set_flags_works` below
99
MiniRacer::Platform.set_flags! :use_strict
1010

11-
def test_locale
11+
def test_locale_mx
1212
skip "TruffleRuby does not have all js timezone by default" if RUBY_ENGINE == "truffleruby"
1313
val = MiniRacer::Context.new.eval("new Date('April 28 2021').toLocaleDateString('es-MX');")
1414
assert_equal '28/4/2021', val
15+
end
1516

17+
def test_locale_us
18+
skip "TruffleRuby does not have all js timezone by default" if RUBY_ENGINE == "truffleruby"
1619
val = MiniRacer::Context.new.eval("new Date('April 28 2021').toLocaleDateString('en-US');")
1720
assert_equal '4/28/2021', val
1821
end
1922

23+
def test_locale_fr
24+
# TODO: this causes a segfault on Linux
25+
26+
skip "TruffleRuby does not have all js timezone by default" if RUBY_ENGINE == "truffleruby"
27+
val = MiniRacer::Context.new.eval("new Date('April 28 2021').toLocaleDateString('fr-FR');")
28+
assert_equal '28/04/2021', val
29+
end
30+
2031
def test_segfault
2132
skip "running this test is very slow"
2233
# 5000.times do

0 commit comments

Comments
 (0)