* 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/trunk@16159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2008-04-22 15:23:01 +00:00
Родитель 4bf25bbe20
Коммит 77f987376c
3 изменённых файлов: 21 добавлений и 9 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Wed Apr 23 00:18:45 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/ruby/test_symbol.rb (TestSymbol#test_to_proc): Improve
tests of Symbol#to_proc.
Tue Apr 22 22:40:57 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/drb/drb.rb (DRb::DRbServer::check_insecure_method): should
@ -1006,7 +1011,7 @@ Thu Mar 20 21:20:19 2008 Tadayoshi Funaba <tadf@dotrb.org>
* rational.c: some improvements (include Shin-ichiro HARA's
effort).
* complex.c: some improvemtns.
* complex.c: some improvements.
* test/ruby/test_rational2.rb: new.

Просмотреть файл

@ -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

Просмотреть файл

@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
#define RUBY_RELEASE_DATE "2008-04-22"
#define RUBY_RELEASE_DATE "2008-04-23"
#define RUBY_VERSION_CODE 190
#define RUBY_RELEASE_CODE 20080422
#define RUBY_RELEASE_CODE 20080423
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#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[];
@ -50,7 +50,7 @@ RUBY_EXTERN const char ruby_copyright[];
RUBY_RELEASE_STR" " \
STRINGIZE(RUBY_RELEASE_NUM)") " \
"["RUBY_PLATFORM"]"
# define RUBY_COPYRIGHT \
# define RUBY_COPYRIGHT \
"ruby - Copyright (C) " \
STRINGIZE(RUBY_BIRTH_YEAR)"-" \
STRINGIZE(RUBY_RELEASE_YEAR)" " \