From 44837a4fd29a72ec0f08945040707598043c2ccd Mon Sep 17 00:00:00 2001 From: kazu Date: Tue, 22 Apr 2008 15:25:23 +0000 Subject: [PATCH] * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve tests of Symbol#to_proc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ test/ruby/test_symbol.rb | 15 +++++++++++---- version.h | 6 +++--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3354a715f5..7857235d15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 23 00:18:45 2008 Kazuhiro NISHIYAMA + + * test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve + tests of Symbol#to_proc. + Tue Apr 22 22:43:05 2008 Akinori MUSHA * eval.c (rb_proc_new, YIELD_FUNC_LAMBDA): Add a new nd_state diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb index 4d29d96f51..42350ba6e7 100644 --- a/test/ruby/test_symbol.rb +++ b/test/ruby/test_symbol.rb @@ -77,9 +77,16 @@ class TestSymbol < Test::Unit::TestCase def test_to_proc assert_equal %w(1 2 3), (1..3).map(&:to_s) - assert_nothing_raised(ArgumentError) { :object_id.to_proc.call([]) } - assert_nothing_raised(ArgumentError) { :object_id.to_proc.call([1]) } - assert_nothing_raised(ArgumentError) { :object_id.to_proc.call([1,2]) } - assert_nothing_raised(ArgumentError) { :object_id.to_proc.call([1,[2,3]]) } + [ + [], + [1], + [1, 2], + [1, [2, 3]], + ].each do |ary| + ary_id = ary.object_id + assert_equal ary_id, :object_id.to_proc.call(ary) + ary_ids = ary.collect{|x| x.object_id } + assert_equal ary_ids, ary.collect(&:object_id) + end end end diff --git a/version.h b/version.h index bab5630fa8..5bdb82070a 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.8.7" -#define RUBY_RELEASE_DATE "2008-04-22" +#define RUBY_RELEASE_DATE "2008-04-23" #define RUBY_VERSION_CODE 187 -#define RUBY_RELEASE_CODE 20080422 +#define RUBY_RELEASE_CODE 20080423 #define RUBY_PATCHLEVEL 5000 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 7 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 4 -#define RUBY_RELEASE_DAY 22 +#define RUBY_RELEASE_DAY 23 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];