-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for TruffleRuby in the gem (#35)
* This is necessary since lib/strscan.rb was added (#25), as the TruffleRuby stdlib strscan.rb is no longer found first by `require "strscan"`. * Write conditions in a way that any other Ruby implementation would simply use its stdlib until it is added explicit support in this gem. Fixes oracle/truffleruby#2420 Co-authored-by: Sutou Kouhei <[email protected]>
- Loading branch information
Showing
9 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
# frozen_string_literal: true | ||
require 'mkmf' | ||
$INCFLAGS << " -I$(top_srcdir)" if $extmk | ||
have_func("onig_region_memsize", "ruby.h") | ||
create_makefile 'strscan' | ||
if RUBY_ENGINE == 'ruby' | ||
$INCFLAGS << " -I$(top_srcdir)" if $extmk | ||
have_func("onig_region_memsize", "ruby.h") | ||
create_makefile 'strscan' | ||
else | ||
File.write('Makefile', dummy_makefile("").join) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require 'strscan.jar' | ||
JRuby::Util.load_ext("org.jruby.ext.strscan.StringScannerLibrary") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters