[macruby-changes] [4688] DietRB/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 03:59:52 PDT 2010
Revision: 4688
http://trac.macosforge.org/projects/ruby/changeset/4688
Author: eloy.de.enige at gmail.com
Date: 2010-10-08 03:59:50 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Use a proper version.rb file
From: Eloy Duran <eloy.de.enige at gmail.com>
Modified Paths:
--------------
DietRB/trunk/bin/dietrb
DietRB/trunk/lib/irb.rb
Added Paths:
-----------
DietRB/trunk/lib/irb/version.rb
Modified: DietRB/trunk/bin/dietrb
===================================================================
--- DietRB/trunk/bin/dietrb 2010-10-08 10:59:40 UTC (rev 4687)
+++ DietRB/trunk/bin/dietrb 2010-10-08 10:59:50 UTC (rev 4688)
@@ -14,7 +14,7 @@
opt.on("--simple-prompt", "Simple prompt mode") { IRB.formatter.prompt = :simple }
opt.on("--noprompt", "No prompt mode") { IRB.formatter.prompt = nil }
opt.on("-v", "--version", "Print the version of #{bin}") do
- puts File.read(File.expand_path('../../VERSION', __FILE__))
+ puts IRB::VERSION::DESCRIPTION
exit
end
end.parse!(ARGV)
Added: DietRB/trunk/lib/irb/version.rb
===================================================================
--- DietRB/trunk/lib/irb/version.rb (rev 0)
+++ DietRB/trunk/lib/irb/version.rb 2010-10-08 10:59:50 UTC (rev 4688)
@@ -0,0 +1,10 @@
+module IRB
+ module VERSION #:nodoc:
+ MAJOR = 0
+ MINOR = 4
+ TINY = 1
+
+ STRING = [MAJOR, MINOR, TINY].join('.')
+ DESCRIPTION = "#{STRING} (DietRB)"
+ end
+end
\ No newline at end of file
Modified: DietRB/trunk/lib/irb.rb
===================================================================
--- DietRB/trunk/lib/irb.rb 2010-10-08 10:59:40 UTC (rev 4687)
+++ DietRB/trunk/lib/irb.rb 2010-10-08 10:59:50 UTC (rev 4688)
@@ -1,5 +1,6 @@
require 'irb/context'
require 'irb/source'
+require 'irb/version'
require 'irb/ext/history'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/4c77c95a/attachment.html>
More information about the macruby-changes
mailing list