Confusing ZeroDivide

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Confusing ZeroDivide

webwarrior
Why this:
[ 1/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
returns 1, but this:
[ 1.0/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
hangs (causes infinite loop) ?
Reply | Threaded
Open this post in threaded view
|

Re: Confusing ZeroDivide

Nicolai Hess


2015-03-20 16:56 GMT+01:00 webwarrior <[hidden email]>:
Why this:
[ 1/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
returns 1, but this:
[ 1.0/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
hangs (causes infinite loop) ?

View this message in context: Confusing ZeroDivide
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


It is a bug.

and now it has a bug entry:

Endless loop on catching ZeroDivide for floats


Reply | Threaded
Open this post in threaded view
|

Re: Confusing ZeroDivide

Nicolai Hess

2015-03-20 21:35 GMT+01:00 Nicolai Hess <[hidden email]>:


2015-03-20 16:56 GMT+01:00 webwarrior <[hidden email]>:
Why this:
[ 1/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
returns 1, but this:
[ 1.0/0 ] on: ZeroDivide do: [:ex | ex resume: 1 ].
hangs (causes infinite loop) ?

View this message in context: Confusing ZeroDivide
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


It is a bug.

and now it has a bug entry:

Endless loop on catching ZeroDivide for floats




And it is fixed in 40572