lib/ruote/util/look.rb in ruote-2.1.11 vs lib/ruote/util/look.rb in ruote-2.2.0

- old
+ new

@@ -1,7 +1,7 @@ #-- -# Copyright (c) 2005-2010, John Mettraux, jmettraux@gmail.com +# Copyright (c) 2005-2011, John Mettraux, jmettraux@gmail.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -77,14 +77,10 @@ ObjectSpace.each_object do |o| next if uninteresting.include?(o.class) stats = h[o.class.to_s] ||= [ 0, 0, 0 ] - size = begin - Marshal.dump(o).size - rescue Exception => e - 1 - end + size = (Marshal.dump(o).size rescue 1) stats[0] += 1 stats[1] = size if size > stats[1] stats[2] += size end