From: Jason Lillywhite Date: 2009-08-21T03:23:26+09:00 Subject: Re: extending ruby - handling errors Ben Giddings wrote: > def calculate_bounding_box(width, height) > begin > width_bound = width.ceil > height_bound = height.ceil > rescue NoMethodError > raise ArgumentError, "width and height must be numeric" > end > width_bound * height_bound > end Thank you. I see that what I wanted is not a good idea. Doing a catch is better. -- Posted via http://www.ruby-forum.com/.