[#46329] [ruby-trunk - Feature #7252][Assigned] version number of 2.0 release — "usa (Usaku NAKAMURA)" <usa@...>

26 messages 2012/11/01

[#46350] RubySpecメンテナ — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

15 messages 2012/11/02
[#46352] Re: RubySpecメンテナ — Urabe Shyouhei <shyouhei@...> 2012/11/02

On 11/01/2012 07:43 PM, Yukihiro Matsumoto wrote:

[#46414] [ruby-trunk - Bug #7287][Open] please rename atomic.h which conflicts with /usr/include/atomic.h in Solaris10 — "ngoto (Naohisa Goto)" <ngotogenome@...>

10 messages 2012/11/06

[#46434] トラップハンドラで許されない操作はなにか — KOSAKI Motohiro <kosaki.motohiro@...>

GyRCPi46aiRHJDkbKEIKCltCdWcgIzcxMzRdIBskQiRyRDQkWSRGJCQkRj88SiUkSjtFTU1MZEJq

9 messages 2012/11/06

[#46440] [ruby-trunk - Bug #7300][Open] Hash#[] の挙動が 1.9.3 と異なっている — "hsbt (Hiroshi SHIBATA)" <shibata.hiroshi@...>

12 messages 2012/11/07

[#46477] Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...>

refinement を導入するときの性能に対する excuse が「method cache に殆どあ

20 messages 2012/11/11
[#46480] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/11

前田です。

[#46488] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

 ささだです.

[#46491] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46493] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

 ささだです.

[#46495] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46497] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — SASADA Koichi <ko1@...> 2012/11/12

(2012/11/12 18:20), Shugo Maeda wrote:

[#46501] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Shugo Maeda <shugo@...> 2012/11/12

前田です。

[#46513] Re: Fwd: [ruby-changes:25559] shugo:r37616 (trunk): * vm_core.h (rb_call_info_t::refinements), compile.c (new_callinfo): — Nobuyoshi Nakada <nobu@...> 2012/11/14

なかだです。

[#46509] [ruby-trunk - Bug #7344][Open] gem pristine bigdecimal が失敗してしまう — "hsbt (Hiroshi SHIBATA)" <shibata.hiroshi@...>

31 messages 2012/11/13

[#46520] [ruby-trunk - Bug #7356][Open] ruby-2.0.0-preview1 で adlint-2.6.10 が性能劣化 — "yanoh (Yutaka Yanoh)" <yutaka@...>

11 messages 2012/11/15

[#46647] [ruby-trunk - Bug #7452][Assigned] Main thread is stopped after running finalizers if the main thread has a finalizer — "mrkn (Kenta Murata)" <muraken@...>

8 messages 2012/11/28

[ruby-dev:46395] [ruby-trunk - Bug #7278] 'warning: regexp match /.../n against to UTF-8 string' in net/protocol.rb

From: "no6v (Nobuhiro IMAI)" <nov@...>
Date: 2012-11-05 03:05:07 UTC
List: ruby-dev #46395
Issue #7278 has been updated by no6v (Nobuhiro IMAI).


これだと yield される文字列のエンコーディングが ASCII-8BIT になってしまいますね。
each_line でダメなケースってあるのかな。test/net/ 以下のテストは全部とおります。
@wbuf を破壊しないことによる影響はちょっと分かりません。

diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 9733d56..743e59b 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -322,7 +322,7 @@ module Net # :nodoc:
 
     def each_crlf_line(src)
       buffer_filling(@wbuf, src) do
-        while line = @wbuf.slice!(/\A.*(?:\n|\r\n|\r(?!\z))/n)
+        @wbuf.each_line do |line|
           yield line.chomp("\n") + "\r\n"
         end
       end


----------------------------------------
Bug #7278: 'warning: regexp match /.../n against to UTF-8 string' in net/protocol.rb
https://bugs.ruby-lang.org/issues/7278#change-32360

Author: kakutani (Shintaro KAKUTANI)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 2.0.0dev


かくたにです。
UTF-8のメールをRails 3.2.8 のActionMailerから出そうとすると、
'warning: regexp match /.../n against to UTF-8 string' の警告が出ます。
添付のパッチではASCII-8BITにforce_encodingする方法にしてみました。

過去1ヶ月の間にもモンキーパッチでしのいでる方を複数見かけたので、対応いただければと思っております。
http://dev.ywesee.com/Yasu/20121012-create-fachinfo-chapter-exporter-job
http://d.hatena.ne.jp/benikujyaku/20111002/1317536555

よろしくお願いします。



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

In This Thread