Source file name of 'mismatched indentations' warning in ruby 1.9

e$B9b66@,5A$G$9!#e(B

Ruby 1.9e$B$K$O%$%s%G%s%H%l%Y%k$N@09g@-$rD4$Y$F7Y9p$rEG$/$h$&$Ke(B
e$B$J$C$F$$$k$h$&$G$9$,!"e(Brequiree$B$G%9%/%j%W%H$rFI$_9~$`:]!"FI$_9~$^$l$ke(B
e$BBP>]$N%U%!%$%k$N%$%s%G%s%H$,$*$+$7$$>l9g$G$b!"FI$9~$$r9T$&B&$Ne(B
e$B%9%/%j%W%H$N%U%!%$%kL>$7$+I=<($5$l$^$;$s!#e(B

$ ./bin/ruby -w test0.rb
test0.rb:1: warning: mismatched indentations: line 1:‘class’ and line
2:‘end’
$ cat test0.rb
require ‘test’
$ cat test.rb
class Foo
end

e$BNc$($P>e5-$N$h$&$J>l9g!"e(Btest.rbe$B$NL>A0$bI=<($5$l$F$[$7$$$N$G$9$,!"e(B
e$B$=$l$OFq$7$$!Je(Bor e$B$9$k$Y$-$G$O$J$$!K$N$G$7$g$&$+!)e(B

e$B9b66@,5Ae(B ([email protected])

e$B@.@%$G$9!#e(B

On Mon, 13 Oct 2008 16:27:22 +0900, masayoshi takahashi
[email protected] wrote:

$ cat test0.rb
require ‘test’
$ cat test.rb
class Foo
end

e$BNc$($P>e5-$N$h$&$J>l9g!"e(Btest.rbe$B$NL>A0$bI=<($5$l$F$[$7$$$N$G$9$,!"e(B
e$B$=$l$OFq$7$$!Je(Bor e$B$9$k$Y$-$G$O$J$$!K$N$G$7$g$&$+!)e(B

e$B9b66@,5Ae(B ([email protected])

Index: parse.y

— parse.y (revision 19769)
+++ parse.y (working copy)
@@ -4856,7 +4856,8 @@ token_info_pop(struct parser_params parser, const
if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) {
/

SKIP */
goto finish;
}

  • rb_warning(“mismatched indentations: line %d:‘%s’ and line
    %d:‘%s’”,
  • rb_compile_warning(ruby_sourcefile, 0,
  •           "mismatched indentations: line %d:'%s' and line 
    

%d:‘%s’",
ptinfo->linenum, ptinfo->token, linenum, token);

finish:

e$B$3$s$J46$8$G$9$+$M!#e(B

% ruby19 -w test0.rb
/home/naruse/test.rb: warning: mismatched indentations: line 1:‘class’
and
line 2:‘end’

e$B$3$&$J$j$^$9!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:36711] Re: source file name of ‘mismatched
indentations’ warning in ruby 1.9”
on Mon, 13 Oct 2008 17:14:03 +0900, “NARUSE, Yui”
[email protected] writes:

|> Ruby 1.9e$B$K$O%$%s%G%s%H%l%Y%k$N@09g@-$rD4$Y$F7Y9p$rEG$/$h$&$Ke(B
|> e$B$J$C$F$$$k$h$&$G$9$,!"e(Brequiree$B$G%9%/%j%W%H$rFI$_9~$`:]!"FI$_9~$^$l$ke(B
|> e$BBP>]$N%U%!%$%k$N%$%s%G%s%H$,$*$+$7$$>l9g$G$b!"FI$9~$$r9T$&B&$Ne(B
|> e$B%9%/%j%W%H$N%U%!%$%kL>$7$+I=<($5$l$^$;$s!#e(B

|Index: parse.y
|===================================================================
|— parse.y (revision 19769)
|+++ parse.y (working copy)
|@@ -4856,7 +4856,8 @@ token_info_pop(struct parser_params parser, const
| if (token_info_has_nonspaces(parser, token) || ptinfo->nonspc) { /

|SKIP */
| goto finish;
| }
|- rb_warning(“mismatched indentations: line %d:‘%s’ and line %d:‘%s’”,
|+ rb_compile_warning(ruby_sourcefile, 0,
|+ “mismatched indentations: line %d:‘%s’ and line %d:‘%s’”,
| ptinfo->linenum, ptinfo->token, linenum, token);
|
| finish:
|
|e$B$3$s$J46$8$G$9$+$M!#e(B

e$B%3%_%C%H$7$F$/$@$5$$!#e(B