mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Add some clarification to the latest til.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
In Ruby 2.2, the `binding` object gives us access to a method
|
In Ruby 2.2, the `binding` object gives us access to a method
|
||||||
`#local_variables` which returns the symbol names of the binding's local
|
`#local_variables` which returns the symbol names of the binding's local
|
||||||
variables.
|
variables. We can see this in action with
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
def square(x)
|
def square(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user