[#41778] [Bug #3515] FreeBSD wrongly raises ECONNRESET on close(2) — Yui NARUSE <redmine@...>

Bug #3515: FreeBSD wrongly raises ECONNRESET on close(2)

12 messages 2010/07/02

[ruby-dev:41817] Re: [Bug #3522] String::size return invalid size on mswin64

From: kuwamoto shintaro <beuniv@...>
Date: 2010-07-05 14:42:58 UTC
List: ruby-dev #41817
こんばんわ。

> ひょっとして以下のパッチで直らないでしょうか。
>
>
> diff --git a/string.c b/string.c
> index 703797f..510c04e 100644
> --- a/string.c
> +++ b/string.c
> @@ -141,7 +141,7 @@ static inline const char *
>  search_nonascii(const char *p, const char *e)
>  {
>  #if SIZEOF_VALUE == 8
> -# define NONASCII_MASK 0x8080808080808080LL
> +# define NONASCII_MASK 0x8080808080808080ULL
>  #elif SIZEOF_VALUE == 4
>  # define NONASCII_MASK 0x80808080UL
>  #endif
>

おお。動くようになりました。
ありがとうございます。

Z:\ruby-trunk\build>ruby -e"puts \"1234567890123\u{3042}\".size"
14

Z:\ruby-trunk\build>ruby -e"puts \"12345678901234\u{3042}\".size"
15

--
kuwamoto

In This Thread