You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/vendor/bundle/ruby/4.0.0/gems/strscan-3.1.8/lib/strscan.rb

21 lines
486 B

# frozen_string_literal: true
case RUBY_ENGINE
when 'ruby'
require 'strscan.so'
require_relative 'strscan/strscan'
when 'jruby'
require 'strscan.jar'
JRuby::Util.load_ext('org.jruby.ext.strscan.StringScannerLibrary')
require_relative 'strscan/strscan'
when 'truffleruby'
if RUBY_ENGINE_VERSION.to_i >= 34
require 'strscan/truffleruby'
else
$LOAD_PATH.delete __dir__
require 'strscan'
end
else
raise NotImplementedError, "Unknown Ruby: #{RUBY_ENGINE}"
end