summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-proc-ext/mrblib/proc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrbgems/mruby-proc-ext/mrblib/proc.rb')
-rw-r--r--mrbgems/mruby-proc-ext/mrblib/proc.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/mrblib/proc.rb b/mrbgems/mruby-proc-ext/mrblib/proc.rb
index 789b7a3ac..abe9c7944 100644
--- a/mrbgems/mruby-proc-ext/mrblib/proc.rb
+++ b/mrbgems/mruby-proc-ext/mrblib/proc.rb
@@ -39,4 +39,12 @@ class Proc
make_curry.call
end
+ def <<(other)
+ ->(*args, &block) { call(other.call(*args, &block)) }
+ end
+
+ def >>(other)
+ ->(*args, &block) { other.call(call(*args, &block)) }
+ end
+
end