Repository: buildr Updated Branches: refs/heads/master 85e45f87e -> 24a688c8f
Support Ruby 1.8.7 Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/24a688c8 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/24a688c8 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/24a688c8 Branch: refs/heads/master Commit: 24a688c8fab1936c5203438e0ece85e5dfed7f87 Parents: 85e45f8 Author: Peter Donald <[email protected]> Authored: Sat Jul 5 16:14:21 2014 +1000 Committer: Peter Donald <[email protected]> Committed: Sat Jul 5 16:14:21 2014 +1000 ---------------------------------------------------------------------- lib/buildr/core/common.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/24a688c8/lib/buildr/core/common.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/core/common.rb b/lib/buildr/core/common.rb index fc46f7a..f2b8ee0 100644 --- a/lib/buildr/core/common.rb +++ b/lib/buildr/core/common.rb @@ -106,6 +106,20 @@ module Buildr #:nodoc: uri = URI.parse(args.values.first.to_s) key = args.keys.first if key.is_a?(Buildr::Artifact) + if RUBY_VERSION < '1.9.0' + class << key + def singleton_class + class << self + self + end + end + + def define_singleton_method(name, &block) + self.singleton_class.send(:define_method, name, &block) + end + end + end + key.define_singleton_method(:source) do uri end
