ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
From: "nagachika (Tomoyuki Chikanaga) via ruby-core" <ruby-core@ml.ruby-lang.org>
To: ruby-core@ml.ruby-lang.org
Cc: "nagachika (Tomoyuki Chikanaga)" <noreply@ruby-lang.org>
Subject: [ruby-core:119542] [Ruby master Bug#20719] `Float` converts ASCII-incompatible string
Date: Mon, 21 Oct 2024 08:50:14 +0000 (UTC)	[thread overview]
Message-ID: <redmine.journal-110158.20241018031917.4@ruby-lang.org> (raw)
In-Reply-To: <redmine.issue-20719.20240907070149.4@ruby-lang.org>

Issue #20719 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED

ruby_3_2 commit:18074c508105244552678cf6afd4b23304cb4c8f merged revision(s) commit:c1862cbb89a6bf42dcd07d92fe4f4bfeebca5775.

----------------------------------------
Bug #20719: `Float` converts ASCII-incompatible string
https://bugs.ruby-lang.org/issues/20719#change-110158

* Author: nobu (Nobuyoshi Nakada)
* Status: Closed
* Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED
----------------------------------------
```ruby
"\u{3036}" #=> "〶"
Float("\u{3036}".encode("utf-16be")) #=> 6.0
```

While:

```ruby
Integer("\u{3036}".encode("utf-16be")) #=> ASCII incompatible encoding: UTF-16BE (Encoding::CompatibilityError)
```



-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

  reply	other threads:[~2024-10-21  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07  7:01 [ruby-core:119095] " nobu (Nobuyoshi Nakada) via ruby-core
2024-10-21  8:50 ` nagachika (Tomoyuki Chikanaga) via ruby-core [this message]
2024-11-04 22:37 ` [ruby-core:119709] " k0kubun (Takashi Kokubun) via ruby-core

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=redmine.journal-110158.20241018031917.4@ruby-lang.org \
    --to=ruby-core@ml.ruby-lang.org \
    --cc=noreply@ruby-lang.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).