Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (8 sloc) 286 Bytes
#! /usr/local/bin/io
# 既存の除算をバックアップ
Number _originalDiv := Number getSlot("/")
# 「分母が0なら答えは0」の分岐を差し込む
Number / := method( i, if ( i == 0, 0, self _originalDiv(i) ) )
# 演算結果
( 1 / 2 ) println
( 1 / 0 ) println
You can’t perform that action at this time.