Looks like C extension doesn't work on TruffleRuby

This commit is contained in:
Takashi Kokubun 2022-10-08 23:37:10 -07:00
parent 69c7cbb638
commit 8516156d8e
No known key found for this signature in database
GPG Key ID: 6FFC433B12EE23DD
2 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@ module Haml::AttributeBuilder
itemscope allowfullscreen default inert sortable
truespeed typemustmatch download].freeze
# For JRuby and Wasm, fallback to Ruby implementation.
if /java|wasm/ === RUBY_PLATFORM
# For JRuby, TruffleRuby, and Wasm, fallback to Ruby implementation.
if /java|wasm/ === RUBY_PLATFORM || RUBY_ENGINE == 'truffleruby'
class << self
def build(escape_attrs, quote, format, boolean_attributes, object_ref, *hashes)
hashes << Haml::ObjectRef.parse(object_ref) if object_ref

View File

@ -14,8 +14,8 @@ module Haml
module Util
extend self
# For JRuby and Wasm, fallback to Ruby implementation.
if /java|wasm/ === RUBY_PLATFORM
# For JRuby, TruffleRuby, and Wasm, fallback to Ruby implementation.
if /java|wasm/ === RUBY_PLATFORM || RUBY_ENGINE == 'truffleruby'
require 'cgi/escape'
def self.escape_html(html)