Skip to content

v2.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 31 Oct 22:59
ff5ca08

Added

  • JRuby now ships a small Java extension (Ruby2html::JavaNative) that accelerates HTML escaping — the renderer's hot path — over the pure-Ruby implementation. About 1.9x faster end-to-end rendering on JRuby; output is byte-identical. Distributed as a ruby2html-<version>-java platform gem with the jar prebuilt (no JDK needed to install); everything else stays pure Ruby.

Changed

  • Ruby2html::Component#render_in accepts Rails' keyword options (locals:), as Rails main (8.2) passes them and deprecates render_in without options.
  • TruffleRuby now uses the pure-Ruby implementation instead of the C extension. TruffleRuby runs C extensions through Sulong but JITs pure Ruby with Graal, which here renders ~28x faster; Ruby2html.native? is now false on TruffleRuby.
  • On CRuby, a C extension that fails to load now prints one warning with the reason (ruby2html: C extension not loaded (...); using the pure-Ruby renderer) instead of silently rendering about 3x slower. JRuby/TruffleRuby and RUBY2HTML_DISABLE_EXT=1 stay silent.
  • Development and single-version CI jobs now run on the latest stable Ruby (4.0). The CRuby test matrix already tracks the official maintained-versions list automatically (currently 3.3, 3.4, 4.0).