[ruby-trunk - Bug #5725][Assigned] Coverage doesn't honor file path encodings

Issue #5725 has been reported by Shyouhei U…


Bug #5725: Coverage doesn’t honor file path encodings
http://redmine.ruby-lang.org/issues/5725

Author: Shyouhei U.
Status: Assigned
Priority: Normal
Assignee: Yusuke E.
Category: M17N
Target version:
ruby -v: ruby 2.0.0dev (2011-12-08 trunk 33977) [x86_64-linux]

以下のように、カバレッジの出力がファイルパスのエンコーディングを無視しています。
これのせいでsimplecovがこけて気づきました。

$B1sF#$G$9!#(B

2011/12/8, Shyouhei U. [email protected]:

$B0J2<$N$h$&$K!"%+%P%l%C%8$N=PNO$,%U%!%$%k%Q%9$N%(%s%3!<%G%#%s%0$rL5;k$7$F$$$^$9!#(B

$B$3$l$N$;$$$G(Bsimplecov$B$,$3$1$F5$$E$-$^$7$?!#(B

$B$"$j$,$H$&$4$6$$$^$9!#(B
$B$3$NLdBj$O!"$"$j$=$&$JM=46$O$7$F$$$?$N$G$9$,5$$,$D$+$J$+$C$?$3$H$K(B
$B$7$F$$$^$7$?!#(B

$B$H$j$"$($:(B rb_filesystem_encoding() $B$N(B String
$B%$%s%9%?%s%9$r:n$k(B
$B$h$&$K$9$k%Q%C%A(B (FILE $B$G$b<h$i$l$F$$$k<j(B)
$B$r=q$$$F$_$^$7$?$,!"(B
M17N $B$O$h$/$o$+$i$J$$$N$G!"@[email protected]%$5$s$N$40U8+$rJ9$-$?$$$G$9!#(B

diff --git a/parse.y b/parse.y
index 3061ed8…b2081a0 100644
— a/parse.y
+++ b/parse.y
@@ -5167,7 +5167,7 @@ coverage(const char *f, int n)
{
VALUE coverages = rb_get_coverages();
if (RTEST(coverages) && RBASIC(coverages)->klass == 0) {

  • VALUE fname = rb_str_new2(f);
  • VALUE fname = rb_external_str_new_with_enc(f, strlen(f),
    rb_filesystem_encoding());
    VALUE lines = rb_ary_new2(n);
    int i;
    RBASIC(lines)->klass = 0;

$B$=$b$=$b$N860x$O!"(Bparse.y $B$d(B load.c $B$d(B eval
$B2s$j$rCf?4$K%3%“FbIt$N(B
$B?’$s$J$H$3$m$G%=!<%9%U%!%$%kL>$,(B char *
$B$H$7$F07$o$l$F$$$k;v$J$N$G!”(B
$B:,K\E*$JBP:v$H$7$F$O!"%U%!%$%kL>$rJR$CC<$+$i(B String
$B%$%s%9%?%s%9$K(B
$BCV$-49$($F$$$/[email protected]$H;W$$$^$9$,!"8x3+(B API
$B$^$G4,[email protected],LO$J(B
[email protected]$K$J$k$h$&$J5$$,$7$^$9!#(B

[email protected]@%$G$9!#(B

(2011/12/08 20:40), Yusuke E. wrote:

M17N $B$O$h$/$o$+$i$J$$$N$G!"@[email protected]%$5$s$N$40U8+$rJ9$-$?$$$G$9!#(B
[ruby-dev:44953] $B$N%Q%C%A$G$h$$$H;W$$$^$9!#(B

Issue #5725 has been updated by Yusuke E…

r22366 でコミットしました。


Yusuke E. [email protected]

Bug #5725: Coverage doesn’t honor file path encodings
https://bugs.ruby-lang.org/issues/5725

Author: Shyouhei U.
Status: Assigned
Priority: Normal
Assignee: Yusuke E.
Category: M17N
Target version:
ruby -v: -

以下のように、カバレッジの出力がファイルパスのエンコーディングを無視しています。
これのせいでsimplecovがこけて気づきました。

https://gist.github.com/1445972

Issue #5725 has been updated by Yui NARUSE.

Status changed from Open to Closed

Backported in r34600.

Backport #5725: Coverage doesn’t honor file path encodings
https://bugs.ruby-lang.org/issues/5725

Author: Shyouhei U.
Status: Closed
Priority: Normal
Assignee: Yusuke E.
Category:
Target version:

以下のように、カバレッジの出力がファイルパスのエンコーディングを無視しています。
これのせいでsimplecovがこけて気づきました。

https://gist.github.com/1445972

Issue #5725 has been updated by Yusuke E…

Status changed from Assigned to Closed


Bug #5725: Coverage doesn’t honor file path encodings
https://bugs.ruby-lang.org/issues/5725

Author: Shyouhei U.
Status: Closed
Priority: Normal
Assignee: Yusuke E.
Category: M17N
Target version:
ruby -v: -

以下のように、カバレッジの出力がファイルパスのエンコーディングを無視しています。
これのせいでsimplecovがこけて気づきました。

https://gist.github.com/1445972

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs