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

Skip to content

Conversation

@S-H-GAMELINKS
Copy link
Contributor

memo:

> ruby -e 'v &&= 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,9))
+-- locals: [:v]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,9))
    +-- body: (length: 1)
        +-- @ LocalVariableAndWriteNode (location: (1,0)-(1,9))
            +-- name_loc: (1,0)-(1,1) = "v"
            +-- operator_loc: (1,2)-(1,5) = "&&="
            +-- value:
            |   @ IntegerNode (location: (1,6)-(1,9))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- name: :v
            +-- depth: 0

> ruby -e 'v ||= 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,9))
+-- locals: [:v]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,9))
    +-- body: (length: 1)
        +-- @ LocalVariableOrWriteNode (location: (1,0)-(1,9))
            +-- name_loc: (1,0)-(1,1) = "v"
            +-- operator_loc: (1,2)-(1,5) = "||="
            +-- value:
            |   @ IntegerNode (location: (1,6)-(1,9))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- name: :v
            +-- depth: 0

memo:
```bash
> ruby -e 'v &&= 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,9))
+-- locals: [:v]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,9))
    +-- body: (length: 1)
        +-- @ LocalVariableAndWriteNode (location: (1,0)-(1,9))
            +-- name_loc: (1,0)-(1,1) = "v"
            +-- operator_loc: (1,2)-(1,5) = "&&="
            +-- value:
            |   @ IntegerNode (location: (1,6)-(1,9))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- name: :v
            +-- depth: 0

> ruby -e 'v ||= 117' --parser=prism --dump=parsetree
@ ProgramNode (location: (1,0)-(1,9))
+-- locals: [:v]
+-- statements:
    @ StatementsNode (location: (1,0)-(1,9))
    +-- body: (length: 1)
        +-- @ LocalVariableOrWriteNode (location: (1,0)-(1,9))
            +-- name_loc: (1,0)-(1,1) = "v"
            +-- operator_loc: (1,2)-(1,5) = "||="
            +-- value:
            |   @ IntegerNode (location: (1,6)-(1,9))
            |   +-- IntegerBaseFlags: decimal
            |   +-- value: 117
            +-- name: :v
            +-- depth: 0
```
@launchable-app
Copy link

launchable-app bot commented Nov 14, 2025

1/66916 Tests Failed

test/ruby/test_settracefunc.rb#test_enable_target_thread
Failure:
TestSetTraceFunc#test_enable_target_thread [/Users/runner/work/ruby/ruby/src/test/ruby/test_settracefunc.rb:2595]:
<[#<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>]> expected but was
<[#<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>,
 #<Thread:0x00000001012d92e8 run>]>.

[-> View Test suite health in main branch]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant