Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Nested it unexpected behavior #8952

@maucs5

Description

@maucs5

Environment Information

  • jruby 10.0.1.0 (3.4.2) 2025-07-17 0f10d1d OpenJDK 64-Bit Server VM 24.0.2+12 on 24.0.2+12 +indy +jit [x86_64-mswin32]
  • Windows 11 Pro

Expected Behavior

https://docs.ruby-lang.org/en/3.4/Proc.html#class-Proc-label-it

Under the nested it section

%w[test me].each { it.each_char { p it } }
# Prints "t", "e", "s", "t", "m", "e"

Actual Behavior

.\jruby -e '%w[test me].each { it.each_char { p it } }'

"test"
"test"
"test"
"test"
"me"
"me"
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions