summaryrefslogtreecommitdiff
path: root/ext/date
diff options
context:
space:
mode:
authorCharles Oliver Nutter <headius@headius.com>2022-12-09 11:43:46 +0700
committergit <svn-admin@ruby-lang.org>2022-12-09 07:55:07 +0000
commite96b64f5e749425b63cc71f256da304fe3ee476b (patch)
treeeacf8450fe24e3ef8053939d941548095ffe9c05 /ext/date
parentf25e76fddd31ed51c17de2d5384e009c82d226f7 (diff)
downloadruby-e96b64f5e749425b63cc71f256da304fe3ee476b.tar.gz
[ruby/date] No-op gem for JRuby for now
Remove all shipped files and require path on JRuby until we can add JRuby's extension to the gem. Temporary workaround for #48 https://github.com/ruby/date/commit/94c3becef2
Diffstat (limited to 'ext/date')
-rw-r--r--ext/date/date.gemspec23
1 files changed, 15 insertions, 8 deletions
diff --git a/ext/date/date.gemspec b/ext/date/date.gemspec
index eecbf786a3..2bf28ffea5 100644
--- a/ext/date/date.gemspec
+++ b/ext/date/date.gemspec
@@ -10,14 +10,21 @@ Gem::Specification.new do |s|
s.summary = "A subclass of Object includes Comparable module for handling dates."
s.description = "A subclass of Object includes Comparable module for handling dates."
- s.require_path = %w{lib}
- s.files = [
- "README.md",
- "lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
- "ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
- "ext/date/zonetab.h", "ext/date/zonetab.list"
- ]
- s.extensions = "ext/date/extconf.rb"
+ if Gem::Platform === s.platform and s.platform =~ 'java' or RUBY_ENGINE == 'jruby'
+ s.platform = 'java'
+ # No files shipped, no require path, no-op for now on JRuby
+ else
+ s.require_path = %w{lib}
+
+ s.files = [
+ "README.md",
+ "lib/date.rb", "ext/date/date_core.c", "ext/date/date_parse.c", "ext/date/date_strftime.c",
+ "ext/date/date_strptime.c", "ext/date/date_tmx.h", "ext/date/extconf.rb", "ext/date/prereq.mk",
+ "ext/date/zonetab.h", "ext/date/zonetab.list"
+ ]
+ s.extensions = "ext/date/extconf.rb"
+ end
+
s.required_ruby_version = ">= 2.4.0"
s.authors = ["Tadayoshi Funaba"]