Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

raise when trying to build gem if Psych is defined

  • Loading branch information...
commit cdf32c9fd633e3f8597560cdc9fac6bd72fb14ad 1 parent bc335d9
David Chelimsky authored May 06, 2011

Showing 1 changed file with 14 additions and 0 deletions. Show diff stats Hide diff stats

  1. 14  Rakefile
14  Rakefile
@@ -2,6 +2,20 @@ require "bundler"
2 2
 Bundler.setup
3 3
 Bundler::GemHelper.install_tasks
4 4
 
  5
+task :build => :raise_if_psych_is_defined
  6
+
  7
+task :raise_if_psych_is_defined do
  8
+  if defined?(Psych)
  9
+    raise <<-MSG
  10
+===============================================================================
  11
+Gems compiled in Ruby environments with Psych loaded are incompatible with Ruby
  12
+environments that don't have Psych loaded. Try building this gem in Ruby 1.8.7
  13
+instead.
  14
+===============================================================================
  15
+MSG
  16
+  end
  17
+end
  18
+
5 19
 require 'rake'
6 20
 require 'fileutils'
7 21
 require 'pathname'

0 notes on commit cdf32c9

Please sign in to comment.
Something went wrong with that request. Please try again.