Skip to content

Normative: Add missing name property for %IntlSegmentsPrototype%[%Symbol.iterator%]#1015

Merged
ryzokuken merged 1 commit into
tc39:mainfrom
anba:segmenter-iterator-name
Jul 29, 2025
Merged

Normative: Add missing name property for %IntlSegmentsPrototype%[%Symbol.iterator%]#1015
ryzokuken merged 1 commit into
tc39:mainfrom
anba:segmenter-iterator-name

Conversation

@anba

@anba anba commented Jul 4, 2025

Copy link
Copy Markdown
Contributor

The function name must be explicitly specified for methods whose property key is a Symbol value.

…bol.iterator%]

The function name must be explicitly specified for methods whose property key is a Symbol value.

@gibson042 gibson042 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks; I agree that this is needed.

@sffc

sffc commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

The observable behavior is:

s = new Intl.Segmenter()
// Segmenter {}
ss = s.segment("123")
// Segments {}
ss[Symbol.iterator].name
// '[Symbol.iterator]'

The last line is the web reality that this PR makes the spec reality.

@sffc

sffc commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

@sffc sffc moved this from Priority Issues to Previously Discussed in ECMA-402 Meeting Topics Jul 17, 2025
@ryzokuken ryzokuken added has consensus Has consensus from TC39-TG2 and removed needs consensus labels Jul 18, 2025
@ryzokuken

Copy link
Copy Markdown
Member

Went to add this to the agenda to find it already there :D

I'm happy to present it to the plenary but please do let me know if anyone else would rather do it to avoid duplicating effort.

@ryzokuken

Copy link
Copy Markdown
Member

2025-07-28: This PR got TG1 approval.

@ryzokuken
ryzokuken merged commit 7bbef9f into tc39:main Jul 29, 2025
2 checks passed
webkit-commit-queue pushed a commit to sosukesuzuki/WebKit that referenced this pull request Aug 4, 2025
…iterator%]`

https://bugs.webkit.org/show_bug.cgi?id=296801

Reviewed by Yusuke Suzuki.

This patch changes to implement tc39/ecma402#1015

* Source/JavaScriptCore/runtime/IntlSegmentsPrototype.cpp:
(JSC::IntlSegmentsPrototype::finishCreation):

Canonical link: https://commits.webkit.org/298181@main
FrankYFTang added a commit to FrankYFTang/test262 that referenced this pull request Nov 4, 2025
ptomato pushed a commit to FrankYFTang/test262 that referenced this pull request Dec 10, 2025
ptomato pushed a commit to tc39/test262 that referenced this pull request Dec 10, 2025
…("123")[Symbol.iterator].name (#4635)

* Add test for ECMA402 PR 1015

tc39/ecma402#1015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has consensus Has consensus from TC39-TG2 normative

Projects

Status: Previously Discussed

Development

Successfully merging this pull request may close these issues.

4 participants