From: 7stud 7stud Date: 2007-03-12T07:39:09+09:00 Subject: Re: string to int: ruby documentation? Eden Li wrote: > irb(main):036:0> Class.constants.map { |c| eval(c).new rescue > nil }.compact.map { |s| Integer(s) rescue $! }.select { |c| c.is_a? > (Exception) }.map { |c| c.class }.uniq > => [TypeError, ArgumentError, NoMethodError] > > Looks like it could TypeError and NoMethodError as well... So the docs don't "document" which exceptions can be thrown by a method? -- Posted via http://www.ruby-forum.com/.