ruby-changes:11859
From: yugui <ko1@a...>
Date: Thu, 21 May 2009 23:48:33 +0900 (JST)
Subject: [ruby-changes:11859] Ruby:r23514 (ruby_1_9_1): merges r23362 from trunk into ruby_1_9_1.
yugui 2009-05-21 23:47:21 +0900 (Thu, 21 May 2009) New Revision: 23514 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23514 Log: merges r23362 from trunk into ruby_1_9_1. -- * test/ruby/test_rubyoptions.rb (test_indentation_check): add a test for indentation check. [ruby-dev:38382] Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/test/ruby/test_rubyoptions.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23513) +++ ruby_1_9_1/ChangeLog (revision 23514) @@ -1,3 +1,8 @@ +Thu May 7 21:42:51 2009 Yusuke Endoh <mame@t...> + + * test/ruby/test_rubyoptions.rb (test_indentation_check): add a test + for indentation check. [ruby-dev:38382] + Thu May 7 16:40:09 2009 Nobuyoshi Nakada <nobu@r...> * array.c (rb_ary_flatten_bang): returns nil if nothing changed. Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 23513) +++ ruby_1_9_1/version.h (revision 23514) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-12" -#define RUBY_PATCHLEVEL 131 +#define RUBY_PATCHLEVEL 132 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/test/ruby/test_rubyoptions.rb =================================================================== --- ruby_1_9_1/test/ruby/test_rubyoptions.rb (revision 23513) +++ ruby_1_9_1/test/ruby/test_rubyoptions.rb (revision 23514) @@ -284,4 +284,15 @@ assert_in_out_err(%w(- -#=foo), "#!ruby -s\n", [], /invalid name for global variable - -# \(NameError\)/) end + + def test_indentation_check + t = Tempfile.new(["test_ruby_test_rubyoption", ".rb"]) + t.puts "begin" + t.puts " end" + t.close + assert_in_out_err(["-w", t.path], "", [], /:2: warning: mismatched indentations at 'end' with 'begin' at 1/) + assert_in_out_err(["-wr", t.path, "-e", ""], "", [], /:2: warning: mismatched indentations at 'end' with 'begin' at 1/) + ensure + t.close(true) if t + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/