ruby-changes:22395
From: naruse <ko1@a...>
Date: Mon, 6 Feb 2012 21:22:08 +0900 (JST)
Subject: [ruby-changes:22395] naruse:r34444 (ruby_1_9_3): merge revision(s) 33784:
naruse 2012-02-06 21:21:54 +0900 (Mon, 06 Feb 2012) New Revision: 34444 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34444 Log: merge revision(s) 33784: * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of warnings when using assert/assert_respond_to. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/lib/test/unit/assertions.rb branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 34443) +++ ruby_1_9_3/ChangeLog (revision 34444) @@ -1,3 +1,8 @@ +Mon Feb 6 21:21:46 2012 NAKAMURA Usaku <usa@r...> + + * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of + warnings when using assert/assert_respond_to. + Mon Feb 6 20:38:19 2012 NARUSE, Yui <naruse@r...> * file.c (file_expand_path): reset coderange after expanding path. Index: ruby_1_9_3/lib/test/unit/assertions.rb =================================================================== --- ruby_1_9_3/lib/test/unit/assertions.rb (revision 34443) +++ ruby_1_9_3/lib/test/unit/assertions.rb (revision 34444) @@ -10,6 +10,8 @@ obj.pretty_inspect.chomp end + MINI_DIR = File.join(File.dirname(File.dirname(File.expand_path(__FILE__))), "minitest") #:nodoc: + UNASSIGNED = Object.new # :nodoc: # :call-seq: @@ -30,7 +32,7 @@ msg = nil when String, Proc else - bt = caller.reject { |s| s.rindex(MiniTest::MINI_DIR, 0) } + bt = caller.reject { |s| s.rindex(MINI_DIR, 0) } raise ArgumentError, "assertion message must be String or Proc, but #{msg.class} was given.", bt end super @@ -250,7 +252,7 @@ # assert_respond_to("hello", :does_not_exist) #Fails def assert_respond_to obj, meth, msg = nil #get rid of overcounting - super if !caller[0].rindex(MiniTest::MINI_DIR, 0) || !obj.respond_to?(meth) + super if !caller[0].rindex(MINI_DIR, 0) || !obj.respond_to?(meth) end ms = instance_methods(true).map {|sym| sym.to_s } Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 34443) +++ ruby_1_9_3/version.h (revision 34444) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 41 +#define RUBY_PATCHLEVEL 42 #define RUBY_RELEASE_DATE "2012-02-06" #define RUBY_RELEASE_YEAR 2012 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/