From: Joel Pearson Date: 2013-03-30T01:38:54+09:00 Subject: Re: Ruby Typing? Sometimes it's best to let the errors occur, there's already a certain amount of error-handling in Ruby. Anyway, this should do what you want: def Add_two_numbers(x,y) [x,y].each { |num| fail ArgumentError, "#{num} is not a number" unless num.is_a? Fixnum } x + y end -- Posted via http://www.ruby-forum.com/.