From 41eb896e09fc2f9a1fa31ca26388b433e74875b5 Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 2 Feb 2009 07:07:59 +0000 Subject: [PATCH] * version.h: bump up to 1.9.2 patchlevel -1. yugui recommend "-1" strongly. * lib/rubygems/version.rb: accept negative patchlevel. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ lib/rubygems/version.rb | 2 +- test/ruby/test_rubyoptions.rb | 4 ++-- version.h | 10 +++++++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 52e2b8fe4c..2d85f349b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Feb 2 16:06:10 2009 Tanaka Akira + + * version.h: bump up to 1.9.2 patchlevel -1. + yugui recommend "-1" strongly. + + * lib/rubygems/version.rb: accept negative patchlevel. + Mon Feb 2 14:53:35 2009 Tanaka Akira * ext/socket/socket.c (sock_initialize): make 3rd argument, protocol, diff --git a/lib/rubygems/version.rb b/lib/rubygems/version.rb index ff4a7bf079..21ea9565b4 100644 --- a/lib/rubygems/version.rb +++ b/lib/rubygems/version.rb @@ -22,7 +22,7 @@ class Gem::Version def self.correct?(version) case version - when Integer, /\A\s*(\d+(\.\d+)*)*\s*\z/ then true + when Integer, /\A\s*(\d+(\.-?\d+)*)*\s*\z/ then true else false end end diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index a540c70ac9..bc47033a0c 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -60,7 +60,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_verbose assert_in_out_err(%w(-vve) + [""]) do |r, e| - assert_match(/^ruby #{RUBY_VERSION}[p ].*? \[#{RUBY_PLATFORM}\]$/, r.join) + assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev).*? \[#{RUBY_PLATFORM}\]$/, r.join) assert_equal RUBY_DESCRIPTION, r.join.chomp assert_equal([], e) end @@ -106,7 +106,7 @@ class TestRubyOptions < Test::Unit::TestCase def test_version assert_in_out_err(%w(--version)) do |r, e| - assert_match(/^ruby #{RUBY_VERSION}[p ].*? \[#{RUBY_PLATFORM}\]$/, r.join) + assert_match(/^ruby #{RUBY_VERSION}(?:[p ]|dev).*? \[#{RUBY_PLATFORM}\]$/, r.join) assert_equal RUBY_DESCRIPTION, r.join.chomp assert_equal([], e) end diff --git a/version.h b/version.h index 9fefeb01f5..0faadfbd09 100644 --- a/version.h +++ b/version.h @@ -1,11 +1,11 @@ -#define RUBY_VERSION "1.9.1" +#define RUBY_VERSION "1.9.2" #define RUBY_RELEASE_DATE "2009-02-02" -#define RUBY_PATCHLEVEL 5000 +#define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 -#define RUBY_VERSION_TEENY 1 +#define RUBY_VERSION_TEENY 2 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 2 #define RUBY_RELEASE_DAY 2 @@ -24,7 +24,11 @@ RUBY_EXTERN const char ruby_copyright[]; #define RUBY_BIRTH_MONTH 2 #define RUBY_BIRTH_DAY 24 +#if RUBY_PATCHLEVEL == -1 +#define RUBY_PATCHLEVEL_STR "dev" +#else #define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL) +#endif #ifndef RUBY_REVISION # include "revision.h"