mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/mathn.rb (Integer::prime_division): raise ZeroDivisionError
on zeros. [ruby-dev:28739] * version.h: 1.8.5 - prepare for preview1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f36b7d8fd5
commit
eb41c8d2e3
3 changed files with 9 additions and 0 deletions
|
@ -130,6 +130,11 @@ Sun Jun 18 00:49:11 2006 Tanaka Akira <akr@m17n.org>
|
||||||
(unix_recvfrom_nonblock): removed.
|
(unix_recvfrom_nonblock): removed.
|
||||||
UNIXSocket#recvfrom_nonblock is removed.
|
UNIXSocket#recvfrom_nonblock is removed.
|
||||||
|
|
||||||
|
Sat Jun 17 22:17:17 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* lib/mathn.rb (Integer::prime_division): raise ZeroDivisionError
|
||||||
|
on zeros. [ruby-dev:28739]
|
||||||
|
|
||||||
Sat Jun 17 14:53:32 2006 Tanaka Akira <akr@m17n.org>
|
Sat Jun 17 14:53:32 2006 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
* lib/pathname.rb: backport from 1.9.
|
* lib/pathname.rb: backport from 1.9.
|
||||||
|
|
|
@ -430,12 +430,15 @@ module DRb
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# An exception wrapping an error object
|
||||||
class DRbRemoteError < DRbError
|
class DRbRemoteError < DRbError
|
||||||
def initialize(error)
|
def initialize(error)
|
||||||
@reason = error.class.to_s
|
@reason = error.class.to_s
|
||||||
super("#{error.message} (#{error.class})")
|
super("#{error.message} (#{error.class})")
|
||||||
set_backtrace(error.backtrace)
|
set_backtrace(error.backtrace)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# the class of the error, as a string.
|
||||||
attr_reader :reason
|
attr_reader :reason
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ class Integer
|
||||||
end
|
end
|
||||||
|
|
||||||
def prime_division
|
def prime_division
|
||||||
|
raise ZeroDivisionError if self == 0
|
||||||
ps = Prime.new
|
ps = Prime.new
|
||||||
value = self
|
value = self
|
||||||
pv = []
|
pv = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue