lib/fast_gettext/vendor/iconv.rb in fast_gettext-0.6.0 vs lib/fast_gettext/vendor/iconv.rb in fast_gettext-0.6.1
- old
+ new
@@ -16,12 +16,16 @@
=end
#Modifications
#wrapped inside FastGettext namespace to reduce conflic
+module FastGettext; end
+
begin
+ old_verbose, $VERBOSE = $VERBOSE, nil # hide deprecation on 1.9.3
require 'iconv'
+ FastGettext::Iconv = Iconv
rescue LoadError
# Provides Iconv.iconv which normally is provided through Ruby/GLib(1) functions.
# This library is required for 'gettext'.
# If you require 'gettext/iconv', it tries to call Ruby/GLib function
# when it doesn't find original Iconv class(iconv.so) it adds a pseudo class.
@@ -32,11 +36,11 @@
#
# (1) Ruby/GLib is a module which is provided from Ruby-GNOME2 Project.
# You can get binaries for Win32(One-Click Ruby Installer).
# <URL: http://ruby-gnome2.sourceforge.jp/>
module FastGettext
- class Iconv2
+ class Iconv
module Failure; end
class InvalidEncoding < ArgumentError; include Failure; end
class IllegalSequence < ArgumentError; include Failure; end
class InvalidCharacter < ArgumentError; include Failure; end
@@ -102,6 +106,8 @@
def self.iconv(to, from, str)
conv(to, from, str).split(//)
end
end
end
-end
\ No newline at end of file
+ensure
+ $VERBOSE = old_verbose
+end