module RubyNext::Language::KernelEval

Public Instance Methods

eval(source, bind = nil, *args) click to toggle source
Calls superclass method
# File lib/ruby-next/language/eval.rb, line 8
def eval(source, bind = nil, *args)
  new_source = ::RubyNext::Language::Runtime.transform(
    source,
    using: bind&.receiver == TOPLEVEL_BINDING.receiver || bind&.receiver&.is_a?(Module)
  )
  RubyNext.debug_source(new_source, "(#{caller_locations(1, 1).first})")
  super new_source, bind, *args
end