ruby-dev (Japanese) list archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-dev:48278] [ruby-trunk - Bug #9903] [Open] Regexp#[] doesn't consider capture name encoding
       [not found] <redmine.issue-9903.20140604130558@ruby-lang.org>
@ 2014-06-04 13:05 ` nobu
  2014-06-04 13:10 ` [ruby-dev:48279] [ruby-trunk - Bug #9903] [Closed] " nobu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2014-06-04 13:05 UTC (permalink / raw
  To: ruby-dev

Issue #9903 has been reported by Nobuyoshi Nakada.

----------------------------------------
Bug #9903: Regexp#[] doesn't consider capture name encoding
https://bugs.ruby-lang.org/issues/9903

* Author: Nobuyoshi Nakada
* Status: Open
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: r46343
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
Regexp#[]が引数の文字列やシンボルを考慮していません。

~~~ruby
key = "\xb1\xb2".force_encoding(Encoding::EUC_JP)
m = /(?<#{key}>.*)/.match("xxx")
p m[key.dup.force_encoding(Encoding::Shift_JIS)]
# => "xxx"
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48279] [ruby-trunk - Bug #9903] [Closed] Regexp#[] doesn't consider capture name encoding
       [not found] <redmine.issue-9903.20140604130558@ruby-lang.org>
  2014-06-04 13:05 ` [ruby-dev:48278] [ruby-trunk - Bug #9903] [Open] Regexp#[] doesn't consider capture name encoding nobu
@ 2014-06-04 13:10 ` nobu
  2014-08-03 16:21 ` [ruby-dev:48460] [ruby-trunk - Bug #9903] " nagachika00
  2014-09-03  3:29 ` [ruby-dev:48512] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: nobu @ 2014-06-04 13:10 UTC (permalink / raw
  To: ruby-dev

Issue #9903 has been updated by Nobuyoshi Nakada.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r46346.

----------
re.c: consider name encoding

* re.c (match_aref, rb_reg_regsub): consider encoding of captured
  names, encoding-incompatible should not match.
  [ruby-dev:48278] [Bug #9903]

----------------------------------------
Bug #9903: Regexp#[] doesn't consider capture name encoding
https://bugs.ruby-lang.org/issues/9903#change-47038

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: r46343
* Backport: 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
Regexp#[]が引数の文字列やシンボルを考慮していません。

~~~ruby
key = "\xb1\xb2".force_encoding(Encoding::EUC_JP)
m = /(?<#{key}>.*)/.match("xxx")
p m[key.dup.force_encoding(Encoding::Shift_JIS)]
# => "xxx"
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48460] [ruby-trunk - Bug #9903] Regexp#[] doesn't consider capture name encoding
       [not found] <redmine.issue-9903.20140604130558@ruby-lang.org>
  2014-06-04 13:05 ` [ruby-dev:48278] [ruby-trunk - Bug #9903] [Open] Regexp#[] doesn't consider capture name encoding nobu
  2014-06-04 13:10 ` [ruby-dev:48279] [ruby-trunk - Bug #9903] [Closed] " nobu
@ 2014-08-03 16:21 ` nagachika00
  2014-09-03  3:29 ` [ruby-dev:48512] " usa
  3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2014-08-03 16:21 UTC (permalink / raw
  To: ruby-dev

Issue #9903 has been updated by Tomoyuki Chikanaga.

Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: REQUIRED, 2.1: DONE

Backported into `ruby_2_1` branch at r47052.

----------------------------------------
Bug #9903: Regexp#[] doesn't consider capture name encoding
https://bugs.ruby-lang.org/issues/9903#change-48179

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: r46343
* Backport: 2.0.0: REQUIRED, 2.1: DONE
----------------------------------------
Regexp#[]が引数の文字列やシンボルを考慮していません。

~~~ruby
key = "\xb1\xb2".force_encoding(Encoding::EUC_JP)
m = /(?<#{key}>.*)/.match("xxx")
p m[key.dup.force_encoding(Encoding::Shift_JIS)]
# => "xxx"
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-dev:48512] [ruby-trunk - Bug #9903] Regexp#[] doesn't consider capture name encoding
       [not found] <redmine.issue-9903.20140604130558@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2014-08-03 16:21 ` [ruby-dev:48460] [ruby-trunk - Bug #9903] " nagachika00
@ 2014-09-03  3:29 ` usa
  3 siblings, 0 replies; 4+ messages in thread
From: usa @ 2014-09-03  3:29 UTC (permalink / raw
  To: ruby-dev

Issue #9903 has been updated by Usaku NAKAMURA.

Backport changed from 2.0.0: REQUIRED, 2.1: DONE to 2.0.0: DONE, 2.1: DONE

backported into `ruby_2_0_0` at r47364.

note that it needed r42251.

----------------------------------------
Bug #9903: Regexp#[] doesn't consider capture name encoding
https://bugs.ruby-lang.org/issues/9903#change-48611

* Author: Nobuyoshi Nakada
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: r46343
* Backport: 2.0.0: DONE, 2.1: DONE
----------------------------------------
Regexp#[]が引数の文字列やシンボルを考慮していません。

~~~ruby
key = "\xb1\xb2".force_encoding(Encoding::EUC_JP)
m = /(?<#{key}>.*)/.match("xxx")
p m[key.dup.force_encoding(Encoding::Shift_JIS)]
# => "xxx"
~~~



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-03  3:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-9903.20140604130558@ruby-lang.org>
2014-06-04 13:05 ` [ruby-dev:48278] [ruby-trunk - Bug #9903] [Open] Regexp#[] doesn't consider capture name encoding nobu
2014-06-04 13:10 ` [ruby-dev:48279] [ruby-trunk - Bug #9903] [Closed] " nobu
2014-08-03 16:21 ` [ruby-dev:48460] [ruby-trunk - Bug #9903] " nagachika00
2014-09-03  3:29 ` [ruby-dev:48512] " usa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).