From c6b548accbd211b69b0611b584e7673147aaea41 Mon Sep 17 00:00:00 2001 From: Charles Oliver Nutter Date: Thu, 18 Jan 2024 19:45:05 -0600 Subject: [ruby/nkf] Add JRuby extension to the gem This pulls in the nkf extension implementation from JRuby. The build and load logic has been updated along the same lines as ruby/digest and the gem appears to build correctly for the -java platform. Fixes https://github.com/ruby/nkf/pull/13 https://github.com/ruby/nkf/commit/18f57f36ed --- lib/nkf.rb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lib/nkf.rb (limited to 'lib') diff --git a/lib/nkf.rb b/lib/nkf.rb new file mode 100644 index 0000000000..d71717d8d8 --- /dev/null +++ b/lib/nkf.rb @@ -0,0 +1,6 @@ +if RUBY_ENGINE == "jruby" + require 'nkf.jar' + JRuby::Util.load_ext('org.jruby.ext.nkf.NKFLibrary') +else + require 'nkf.so' +end -- cgit v1.2.3