diff options
| author | h2so5 <[email protected]> | 2013-04-21 17:50:54 +0900 |
|---|---|---|
| committer | h2so5 <[email protected]> | 2013-04-21 18:01:09 +0900 |
| commit | 2fa8bf468369ddadc26badd501b2b2c55dec4620 (patch) | |
| tree | 1c41c06c346253e4e6b940af454d4a01342b783f /mrbgems/mruby-symbol-ext/mrblib | |
| parent | 4a311a4760af037f7a9b8e2b60b4448e92e7f5e4 (diff) | |
| download | mruby-2fa8bf468369ddadc26badd501b2b2c55dec4620.tar.gz mruby-2fa8bf468369ddadc26badd501b2b2c55dec4620.zip | |
Add Symbol#to_proc, Symbol.all_symbols
Diffstat (limited to 'mrbgems/mruby-symbol-ext/mrblib')
| -rw-r--r-- | mrbgems/mruby-symbol-ext/mrblib/symbol.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mrbgems/mruby-symbol-ext/mrblib/symbol.rb b/mrbgems/mruby-symbol-ext/mrblib/symbol.rb new file mode 100644 index 000000000..f716162e8 --- /dev/null +++ b/mrbgems/mruby-symbol-ext/mrblib/symbol.rb @@ -0,0 +1,9 @@ +class Symbol + + def to_proc + Proc.new do |obj, *args| + obj.send(self, *args) + end + end + +end |
