From 2a9a662142d0e62337f4e8c92abca41ebf42cf59 Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Sun, 28 Jun 2020 14:59:37 -0400 Subject: Fix some issues with 1.4 on older Rubies - Required to fully support rspec. - Resolves #63. --- Rakefile | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index c19b7d1..7beb3b6 100644 --- a/Rakefile +++ b/Rakefile @@ -6,10 +6,27 @@ require 'hoe' Hoe.plugin :bundler Hoe.plugin :doofus -Hoe.plugin :email unless ENV['CI'] or ENV['TRAVIS'] Hoe.plugin :gemspec2 Hoe.plugin :git -Hoe.plugin :travis + +if RUBY_VERSION < '1.9' + class Array + def to_h + Hash[*self.flatten(1)] + end + end + + class Gem::Specification + def metadata=(*) + end + end + + class Object + def caller_locations(*) + [] + end + end +end _spec = Hoe.spec 'diff-lcs' do developer('Austin Ziegler', 'halostatue@gmail.com') -- cgit v1.2.1