Skip to content

Polyglot shell does not seem to support local variables #1695

@fniephaus

Description

@fniephaus

Tested with GraalVM CE 19.0.0 on macOS:

irb

$ irb --jvm
irb(main):001:0> x = 42
=> 42
irb(main):003:0> x
=> 42

Polyglot Shell

$ polyglot --jvm --shell
GraalVM MultiLanguage Shell 19.0.0
  Ruby version 2.6.2
ruby> x = 42
42
ruby> x
undefined local variable or method `x' for main:Object (NameError)
        at <ruby> <top (required)>(<shell>:1:0)
        at <ruby> parsing-request(Unknown)
ruby> $x = 42
42
ruby> $x
42

Expected behavior: identical

Metadata

Metadata

Assignees

Labels

polyglotUses multiple Truffle languages or host interop

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions