summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-numeric-ext/mrblib
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2014-03-04 12:45:11 +0900
committerTomoyuki Sahara <[email protected]>2014-03-04 12:45:11 +0900
commit4ad0896bdad6708ef0e45540ab53dcbfe5b94a55 (patch)
tree980bc2481a3914d46677ad6f3d7e9842bacb7e68 /mrbgems/mruby-numeric-ext/mrblib
parent6b6277e2c6f24f66c021df345631e7d69ea13056 (diff)
downloadmruby-4ad0896bdad6708ef0e45540ab53dcbfe5b94a55.tar.gz
mruby-4ad0896bdad6708ef0e45540ab53dcbfe5b94a55.zip
add Integer#div and Float#div.
Diffstat (limited to 'mrbgems/mruby-numeric-ext/mrblib')
-rw-r--r--mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb b/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
new file mode 100644
index 000000000..dfc6ba87c
--- /dev/null
+++ b/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb
@@ -0,0 +1,5 @@
+module Integral
+ def div(other)
+ self.divmod(other)[0]
+ end
+end