Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libv8-node 17.x Take 2 #271

Merged
merged 6 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ jobs:
libc:
- "gnu"
- "musl"
exclude:
# there's no libv8-node (v16) for aarch64-linux-musl at the moment
- platform: "arm64"
libc: "musl"

name: linux-${{ matrix.platform }} - ruby-${{ matrix.ruby }} - ${{ matrix.libc }}
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion ext/mini_racer_extension/mini_racer_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static VALUE convert_v8_to_ruby(Isolate* isolate, Local<Context> context,

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

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

Expand Down
4 changes: 2 additions & 2 deletions lib/mini_racer/version.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module MiniRacer
VERSION = "0.6.4"
LIBV8_NODE_VERSION = "~> 16.19.0.0"
VERSION = "0.6.5"
LIBV8_NODE_VERSION = "~> 17.9.1.0"
end
13 changes: 12 additions & 1 deletion test/mini_racer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,26 @@ class MiniRacerTest < Minitest::Test
# see `test_platform_set_flags_works` below
MiniRacer::Platform.set_flags! :use_strict

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

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

def test_locale_fr
# TODO: this causes a segfault on Linux

skip "TruffleRuby does not have all js timezone by default" if RUBY_ENGINE == "truffleruby"
val = MiniRacer::Context.new.eval("new Date('April 28 2021').toLocaleDateString('fr-FR');")
assert_equal '28/04/2021', val
end

def test_segfault
skip "running this test is very slow"
# 5000.times do
Expand Down