Skip to content

Instantly share code, notes, and snippets.

@bkabrda
Created December 1, 2011 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkabrda/1414497 to your computer and use it in GitHub Desktop.
Save bkabrda/1414497 to your computer and use it in GitHub Desktop.
MKRF proposed patch
--- test/unit/test_availability.rb.orig 2011-11-30 13:58:06.206927700 +0100
+++ test/unit/test_availability.rb 2011-11-30 13:57:43.000000000 +0100
@@ -136,9 +136,17 @@
end
def test_default_include_dir_should_be_from_rbconfig
- expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
- Config::CONFIG['sitelibdir'], "."]
-
+ # Ruby 1.9
+ if Config::CONFIG['rubyhdrdir']
+ # Have to add exactly what is in the availiability.rb for Ruby 1.9, since
+ # there is no special RbConfig::CONFIG field for that
+ expected = [RbConfig::CONFIG['includedir'], Config::CONFIG['rubyhdrdir'] +
+ "/" + Config::CONFIG['arch'], RbConfig::CONFIG["archdir"],
+ RbConfig::CONFIG['sitelibdir'], "."]
+ else
+ expected = [Config::CONFIG['includedir'], Config::CONFIG["archdir"],
+ Config::CONFIG['sitelibdir'], "."]
+ end
assert_equal expected, @avail.send(:instance_variable_get, :@includes)
end
-end
\ No newline at end of file
+end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment