ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
@ 2024-02-26 18:58 fablestales (Fable Tales) via ruby-core
  2024-02-26 19:02 ` [ruby-core:116961] " fablestales (Fable Tales) via ruby-core
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fablestales (Fable Tales) via ruby-core @ 2024-02-26 18:58 UTC (permalink / raw)
  To: ruby-core; +Cc: fablestales (Fable Tales)

Issue #20305 has been reported by fablestales (Fable Tales).

----------------------------------------
Bug #20305: commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
https://bugs.ruby-lang.org/issues/20305

* Author: fablestales (Fable Tales)
* Status: Open
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
given a script:
```
#script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```

The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice

```
(commit 1d2d25dcadda0764f303183ac091d0c87b432566)
 ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
["안", "\xEB"]
 ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
(114e71d06280f9c57b9859ee4405ae89a989ddb6)
 ((HEAD detached at 114e71d062)) $ make -j
...
 ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
["안"]
 ((HEAD detached at 114e71d062)) $ cat script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```


the expected result here is almost certainly the latter output, and not the former.



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:116961] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
  2024-02-26 18:58 [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters fablestales (Fable Tales) via ruby-core
@ 2024-02-26 19:02 ` fablestales (Fable Tales) via ruby-core
  2024-02-26 19:28 ` [ruby-core:116962] " fablestales (Fable Tales) via ruby-core
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fablestales (Fable Tales) via ruby-core @ 2024-02-26 19:02 UTC (permalink / raw)
  To: ruby-core; +Cc: fablestales (Fable Tales)

Issue #20305 has been updated by fablestales (Fable Tales).


fablestales (Fable Tales) wrote:
> given a script:
> ```
> #script.rb
> p "안녕".byteslice(0, 4).grapheme_clusters
> ```
> 
> The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice
> 
> ```
> (commit 1d2d25dcadda0764f303183ac091d0c87b432566)
>  ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
> ["안", "\xEB"]
>  ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
> (114e71d06280f9c57b9859ee4405ae89a989ddb6)
>  ((HEAD detached at 114e71d062)) $ make -j
> ...
>  ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
> ["안"]
>  ((HEAD detached at 114e71d062)) $ cat script.rb
> p "안녕".byteslice(0, 4).grapheme_clusters
> ```
> 
> 
> the expected result here is almost certainly the latter output, and not the former.



to clarify: grapheme_clusters used to ignore partial characters from a byteslice, now it does not.

----------------------------------------
Bug #20305: commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
https://bugs.ruby-lang.org/issues/20305#change-107003

* Author: fablestales (Fable Tales)
* Status: Open
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
given a script:
```
#script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```

The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice

```
(commit 1d2d25dcadda0764f303183ac091d0c87b432566)
 ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
["안", "\xEB"]
 ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
(114e71d06280f9c57b9859ee4405ae89a989ddb6)
 ((HEAD detached at 114e71d062)) $ make -j
...
 ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
["안"]
 ((HEAD detached at 114e71d062)) $ cat script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```


the expected result here is almost certainly the latter output, and not the former.



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:116962] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
  2024-02-26 18:58 [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters fablestales (Fable Tales) via ruby-core
  2024-02-26 19:02 ` [ruby-core:116961] " fablestales (Fable Tales) via ruby-core
@ 2024-02-26 19:28 ` fablestales (Fable Tales) via ruby-core
  2024-05-29 22:40 ` [ruby-core:118072] " k0kubun (Takashi Kokubun) via ruby-core
  2024-07-06  7:19 ` [ruby-core:118464] " nagachika (Tomoyuki Chikanaga) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: fablestales (Fable Tales) via ruby-core @ 2024-02-26 19:28 UTC (permalink / raw)
  To: ruby-core; +Cc: fablestales (Fable Tales)

Issue #20305 has been updated by fablestales (Fable Tales).


I added a failing test to reproduce this issue in this PR: https://github.com/ruby/ruby/pull/10103

----------------------------------------
Bug #20305: commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
https://bugs.ruby-lang.org/issues/20305#change-107004

* Author: fablestales (Fable Tales)
* Status: Open
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
given a script:
```
#script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```

The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice

```
(commit 1d2d25dcadda0764f303183ac091d0c87b432566)
 ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
["안", "\xEB"]
 ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
(114e71d06280f9c57b9859ee4405ae89a989ddb6)
 ((HEAD detached at 114e71d062)) $ make -j
...
 ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
["안"]
 ((HEAD detached at 114e71d062)) $ cat script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```


the expected result here is almost certainly the latter output, and not the former.



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:118072] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
  2024-02-26 18:58 [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters fablestales (Fable Tales) via ruby-core
  2024-02-26 19:02 ` [ruby-core:116961] " fablestales (Fable Tales) via ruby-core
  2024-02-26 19:28 ` [ruby-core:116962] " fablestales (Fable Tales) via ruby-core
@ 2024-05-29 22:40 ` k0kubun (Takashi Kokubun) via ruby-core
  2024-07-06  7:19 ` [ruby-core:118464] " nagachika (Tomoyuki Chikanaga) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: k0kubun (Takashi Kokubun) via ruby-core @ 2024-05-29 22:40 UTC (permalink / raw)
  To: ruby-core; +Cc: k0kubun (Takashi Kokubun)

Issue #20305 has been updated by k0kubun (Takashi Kokubun).

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

ruby_3_3 commit:72a45ac7a3cc9bbecf641ac505f8ee791c9da48c merged revision(s) commit:3a04ea2d0379dd8c6623c2d5563e6b4e23986fae.

----------------------------------------
Bug #20305: commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
https://bugs.ruby-lang.org/issues/20305#change-108499

* Author: fablestales (Fable Tales)
* Status: Closed
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED, 3.3: DONE
----------------------------------------
given a script:
```
#script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```

The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice

```
(commit 1d2d25dcadda0764f303183ac091d0c87b432566)
 ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
["안", "\xEB"]
 ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
(114e71d06280f9c57b9859ee4405ae89a989ddb6)
 ((HEAD detached at 114e71d062)) $ make -j
...
 ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
["안"]
 ((HEAD detached at 114e71d062)) $ cat script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```


the expected result here is almost certainly the latter output, and not the former.



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:118464] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
  2024-02-26 18:58 [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters fablestales (Fable Tales) via ruby-core
                   ` (2 preceding siblings ...)
  2024-05-29 22:40 ` [ruby-core:118072] " k0kubun (Takashi Kokubun) via ruby-core
@ 2024-07-06  7:19 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2024-07-06  7:19 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

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

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

ruby_3_2 commit:a67b43d99e24dc7c2a9e134a65f28f968fe124c1 merged revision(s) commit:3a04ea2d0379dd8c6623c2d5563e6b4e23986fae.

----------------------------------------
Bug #20305: commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters
https://bugs.ruby-lang.org/issues/20305#change-108979

* Author: fablestales (Fable Tales)
* Status: Closed
* Backport: 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONE, 3.3: DONE
----------------------------------------
given a script:
```
#script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```

The commit 1d2d25dcadda0764f303183ac091d0c87b432566 (https://github.com/ruby/ruby/commit/1d2d25dcadda0764f303183ac091d0c87b432566) breaks the grapheme_clusters method on a byte slice

```
(commit 1d2d25dcadda0764f303183ac091d0c87b432566)
 ((HEAD detached at 1d2d25dcad)) $ ./ruby --disable=gems script.rb
["안", "\xEB"]
 ((HEAD detached at 1d2d25dcad)) $ git checkout HEAD^
(114e71d06280f9c57b9859ee4405ae89a989ddb6)
 ((HEAD detached at 114e71d062)) $ make -j
...
 ((HEAD detached at 114e71d062)) $ ./ruby --disable=gems script.rb
["안"]
 ((HEAD detached at 114e71d062)) $ cat script.rb
p "안녕".byteslice(0, 4).grapheme_clusters
```


the expected result here is almost certainly the latter output, and not the former.



-- 
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/

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

end of thread, other threads:[~2024-07-06  7:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 18:58 [ruby-core:116960] [Ruby master Bug#20305] commit 1d2d25dcadda0764f303183ac091d0c87b432566 breaks grapheme_clusters fablestales (Fable Tales) via ruby-core
2024-02-26 19:02 ` [ruby-core:116961] " fablestales (Fable Tales) via ruby-core
2024-02-26 19:28 ` [ruby-core:116962] " fablestales (Fable Tales) via ruby-core
2024-05-29 22:40 ` [ruby-core:118072] " k0kubun (Takashi Kokubun) via ruby-core
2024-07-06  7:19 ` [ruby-core:118464] " nagachika (Tomoyuki Chikanaga) via ruby-core

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).