Permalink
Browse files

Allow building with multiple Ruby patchlevels.

  • Loading branch information...
1 parent 4c98930 commit 8690c312e73d405c65eb583876b6b1e808dadab1 @jonforums jonforums committed Feb 26, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 tasks/build.rb
View
@@ -1,12 +1,14 @@
@ruby_version = "1.8.7"
-@ruby_patchlevel = 330
+@ruby_patchlevel = [330, 334]
def correct_version?
@ruby_version == RUBY_VERSION &&
- @ruby_patchlevel == RUBY_PATCHLEVEL
+ @ruby_patchlevel.any? { |p| p == RUBY_PATCHLEVEL }
end
-abort "You can only build pik with ruby-1.8.7-p330" unless correct_version?
+unless correct_version?
+ abort "You can only build pik with ruby-1.8.7-p{%s}" % @ruby_patchlevel.join(',')
+end
EXE_VERSION = {
'version' => {
@@ -69,4 +71,4 @@ def correct_version?
task :rebuild, :needs => [
:clobber_exy, :build]
desc "reinstalls executable"
-task :reinstall, :needs => [:clobber_exy, :install]
+task :reinstall, :needs => [:clobber_exy, :install]

0 comments on commit 8690c31

Please sign in to comment.