[前][次][番号順一覧][スレッド一覧]

ruby-changes:57232

From: Nobuyoshi <ko1@a...>
Date: Fri, 23 Aug 2019 20:53:25 +0900 (JST)
Subject: [ruby-changes:57232] Nobuyoshi Nakada: 2e28b3678f (master): [ruby/stringio] Fixed a typo

https://git.ruby-lang.org/ruby.git/commit/?id=2e28b3678f

From 2e28b3678fc1b48f7dbca751d2a65d3fe0018789 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 23 Aug 2019 20:43:15 +0900
Subject: [ruby/stringio] Fixed a typo

https://github.com/ruby/stringio/commit/b249631c433f800c979be2705bf63555075db2fc#commitcomment-34804150

https://github.com/ruby/stringio/commit/998d6257fb

diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index f7b520a..4a81e84 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -303,7 +303,7 @@ detect_bom(VALUE str, int *bomlen) https://github.com/ruby/ruby/blob/trunk/ext/stringio/stringio.c#L303
 
       case 0:
 	if (len < 4) break;
-	if ((unsigned char)p[1] == 0 && (unsigned char)p[2] == 0xFE & (unsigned char)p[3] == 0xFF) {
+	if ((unsigned char)p[1] == 0 && (unsigned char)p[2] == 0xFE && (unsigned char)p[3] == 0xFF) {
 	    *bomlen = 4;
 	    return rb_enc_find_index("UTF-32BE");
 	}
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]