Skip to content
Browse files

changed extconf.rb to support Ruby 2.0.0

  • Loading branch information...
1 parent 84267d9 commit c8d76b2f24e36e6ed2f6888776e18509327ab6c2 Peter Ohler committed Apr 24, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 ext/ox/extconf.rb
View
8 ext/ox/extconf.rb
@@ -16,13 +16,13 @@
'RUBY_VERSION_MAJOR' => version[0],
'RUBY_VERSION_MINOR' => version[1],
'RUBY_VERSION_MICRO' => version[2],
- 'HAS_RB_TIME_TIMESPEC' => ('ruby' == type && '1.9.3' == RUBY_VERSION) ? 1 : 0,
+ 'HAS_RB_TIME_TIMESPEC' => ('ruby' == type && ('1.9.3' == RUBY_VERSION || '2' <= version[0])) ? 1 : 0,
'HAS_ENCODING_SUPPORT' => (('ruby' == type || 'rubinius' == type) &&
(('1' == version[0] && '9' == version[1]) || '2' <= version[0])) ? 1 : 0,
- 'HAS_NANO_TIME' => ('ruby' == type && '1' == version[0] && '9' == version[1]) ? 1 : 0,
+ 'HAS_NANO_TIME' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
'HAS_RSTRUCT' => ('ruby' == type || 'ree' == type) ? 1 : 0,
- 'HAS_IVAR_HELPERS' => ('ruby' == type && '1' == version[0] && '9' == version[1]) ? 1 : 0,
- 'HAS_PROC_WITH_BLOCK' => ('ruby' == type && '1' == version[0] && '9' == version[1]) ? 1 : 0,
+ 'HAS_IVAR_HELPERS' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
+ 'HAS_PROC_WITH_BLOCK' => ('ruby' == type && ('1' == version[0] && '9' == version[1]) || '2' <= version[0]) ? 1 : 0,
'HAS_TOP_LEVEL_ST_H' => ('ree' == type || ('ruby' == type && '1' == version[0] && '8' == version[1])) ? 1 : 0,
}

0 comments on commit c8d76b2

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