Skip to content

Trouble with instance_eval when using embedded API #4067

Open
@chadselph

Description

First, I want to explain I am not a ruby programmer, so I probably haven't debugged this as well as I could have. I'm writing an application on the JVM that takes as its input some files from an existing ruby DSL. Basically, it makes use of instance_eval and the files it evals occasionally eval other files. I can't seem to get this to work from the embedded API.

Environment

Provide at least:

  • Version: org.jruby:jruby-complete:9.1.2.0
  • Operating system and platform: 14.5.0 Darwin Kernel Version 14.5.

Expected Behavior

I expect that running ::Kernel.eval from within a block of instance_eval will put the symbols in scope.

Actual Behavior

Code gets evaled, (confirmed with ::Kernel.puts) but symbols are not in scope.

I have a minimized example here, with the error and the behavior in standard ruby:

https://gist.github.com/chadselph/0be497f37b16f1b01009836686e3875c

Thanks for you time!

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions