Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
diff --git a/lib/iconv.rb b/lib/iconv.rb index eb51493..892abaa 100644 --- a/lib/iconv.rb +++ b/lib/iconv.rb @@ -13,9 +13,12 @@ class Iconv @to, @from = to, from @handle = Iconv.create to, from Errno.handle if @handle.address == -1 + @closed = false end def close + return if @closed + @closed = true Errno.handle if Iconv.close(@handle) != 0 end
This paste will be private.
From the Design Piracy series on my blog: