Sha256: a8190d21b7ca113e05827a95a9d05ea4c0584745488a1f0a2619a1e265512f06
Contents?: true
Size: 483 Bytes
Versions: 38
Compression:
Stored size: 483 Bytes
Contents
# Copyright (c) 2012 National ICT Australia Limited (NICTA). # This software may be used and distributed solely under the terms of the MIT license (License). # You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT. # By downloading or using this software you accept the terms and the liability disclaimer in the License. class String def ducktype return self if self =~ /^0.+/ Integer(self) rescue Float(self) rescue self end end
Version data entries
38 entries across 38 versions & 1 rubygems