mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 05:12:56 +00:00
14 lines
164 B
Plaintext
14 lines
164 B
Plaintext
|
#!/usr/bin/env ruby
|
||
|
#
|
||
|
# Run a quick calculation with Ruby
|
||
|
#
|
||
|
# Usage: calc "1/2"
|
||
|
|
||
|
class Integer
|
||
|
def /(other)
|
||
|
fdiv(other)
|
||
|
end
|
||
|
end
|
||
|
|
||
|
puts eval(ARGV.join(""))
|