Skip to content
This repository
Browse code

1.8.7: Binding#eval (new)

  • Loading branch information...
commit 4cbf1e7b6ad18b6070fcc2a405edc2c13953f005 1 parent c5b9450
Marc-André Lafortune marcandre authored

Showing 2 changed files with 9 additions and 0 deletions. Show diff stats Hide diff stats

  1. +1 0  lib/1.8.7.rb
  2. +8 0 lib/1.8.7/binding.rb
1  lib/1.8.7.rb
@@ -3,6 +3,7 @@
3 3 require 'enumerator'
4 4
5 5 require '1.8.7/array'
  6 +require '1.8.7/binding'
6 7 require '1.8.7/enumerable'
7 8 require '1.8.7/enumerator'
8 9
8 lib/1.8.7/binding.rb
... ... @@ -0,0 +1,8 @@
  1 +class Binding
  2 + # Evaluates the Ruby expression(s) in string, in the binding‘s context.
  3 + # If the optional filename and lineno parameters are present,
  4 + # they will be used when reporting syntax errors.
  5 + def eval(expr, *arg)
  6 + Kernel.eval(expr, self, *arg)
  7 + end
  8 +end

0 comments on commit 4cbf1e7

Please sign in to comment.
Something went wrong with that request. Please try again.