summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Rosický <[email protected]>2021-06-12 18:49:57 +0200
committerHiroshi SHIBATA <[email protected]>2021-10-12 20:46:13 +0900
commit94882df3a215a3de16fa7ca18cf5c160f904c904 ()
tree1150503c5eb6a5b570ba3eb5e8fce26998fe036a
parentff1f696d300cdf2a7073ddec91846cd3aee103d8 (diff)
[ruby/digest] jruby support
https://.com/ruby/digest/commit/2e9dc14693
-rw-r--r--ext/digest/bubblebabble/lib/bubblebabble.rb9
-rw-r--r--ext/digest/digest.gemspec36
-rw-r--r--ext/digest/lib/digest.rb8
-rw-r--r--ext/digest/md5/lib/md5.rb9
-rw-r--r--ext/digest/rmd160/lib/rmd160.rb9
-rw-r--r--ext/digest/sha1/lib/sha1.rb9
-rw-r--r--ext/digest/sha2/lib/sha2.rb7
-rw-r--r--tool/lib/core_assertions.rb1
8 files changed, 76 insertions, 12 deletions
@@ -0,0 +1,9 @@
@@ -10,7 +10,11 @@ Gem::Specification.new do |spec|
spec.summary = %q{Provides a framework for message digest libraries.}
spec.description = %q{Provides a framework for message digest libraries.}
spec.homepage = "https://.com/ruby/digest"
- spec.licenses = ["Ruby", "BSD-2-Clause"]
spec.files = [
"LICENSE.txt", "README.md",
@@ -46,13 +50,27 @@ Gem::Specification.new do |spec|
spec.bindir = "exe"
spec.executables = []
spec.require_paths = ["lib"]
- spec.extensions = %w[
- ext/digest/extconf.rb
- ext/digest/bubblebabble/extconf.rb
- ext/digest/md5/extconf.rb
- ext/digest/rmd160/extconf.rb
- ext/digest/sha1/extconf.rb
- ext/digest/sha2/extconf.rb
- ]
spec.metadata["msys2_mingw_dependencies"] = "openssl"
end
@@ -1,5 +1,9 @@
# frozen_string_literal: false
-require 'digest.so'
module Digest
# A mutex for Digest().
@@ -8,7 +12,7 @@ module Digest
def self.const_missing(name) # :nodoc:
case name
when :SHA256, :SHA384, :SHA512
- lib = 'digest/sha2.so'
else
lib = File.join('digest', name.to_s.downcase)
end
@@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
@@ -11,7 +11,12 @@
# $Id$
require 'digest'
-require 'digest/sha2.so'
module Digest
#
@@ -270,6 +270,7 @@ BEGIN {
eom
args = args.dup
args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, capture_stdout, true, **opt)
ensure
if res_c