[Integer => c] RUBY emits: puts "a is integer" if a in Integer b in [Integer => c] However, as long as you don't use in earlier in scope, the b line cor..."> [Integer => c] RUBY emits: puts "a is integer" if a in Integer b in [Integer => c] However, as long as you don't..."> [Integer => c] RUBY emits: puts "a is integer" if a in Integer b in [Integer => c] However, as long as you don't...">
Skip to content

Rightward assignment => converted to in when preceded by in in a prior line #146

Closed
@nixme

Description

@nixme

Example:

puts SyntaxTree.format <<~RUBY
  if a in Integer
    puts "a is integer"
  end

  b => [Integer => c]
RUBY

emits:

puts "a is integer" if a in Integer

b in [Integer => c]

However, as long as you don't use in earlier in scope, the b line correctly isn't modified

puts SyntaxTree.format "b => [Integer => c]"

emits

b => [Integer => c]

Happy to take a crack at fixing if you can point me in the right direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions