mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 23:28:02 +00:00
Add another example, this time with a symbol.
This commit is contained in:
@@ -26,3 +26,10 @@ You can even be more specific if you'd like
|
|||||||
> Math.const_get("PI")
|
> Math.const_get("PI")
|
||||||
#=> 3.141592653589793
|
#=> 3.141592653589793
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Symbols are valid as well
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
> Math.const_get(:PI)
|
||||||
|
#=> 3.141592653589793
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user