Ruby LanguageDynamic Evaluation


Syntax

  • eval "source"
  • eval "source", binding
  • eval "source", proc
  • binding.eval "source" # equal to eval "source", binding

Parameters

ParameterDetails
"source"Any Ruby source code
bindingAn instance of Binding class
procAn instance of Proc class