PROTON-736: Replace missed force_encoding with encode

Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/d770a1ef
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/d770a1ef
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/d770a1ef

Branch: refs/heads/examples
Commit: d770a1ef689d859888f8cc610486b0dba4ea5fa9
Parents: 6504db6
Author: Darryl L. Pierce <[email protected]>
Authored: Tue Nov 18 09:01:33 2014 -0500
Committer: Darryl L. Pierce <[email protected]>
Committed: Tue Nov 18 09:01:33 2014 -0500

----------------------------------------------------------------------
 proton-c/bindings/ruby/lib/qpid_proton/strings.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/d770a1ef/proton-c/bindings/ruby/lib/qpid_proton/strings.rb
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/lib/qpid_proton/strings.rb 
b/proton-c/bindings/ruby/lib/qpid_proton/strings.rb
index dad96ad..d8f5851 100644
--- a/proton-c/bindings/ruby/lib/qpid_proton/strings.rb
+++ b/proton-c/bindings/ruby/lib/qpid_proton/strings.rb
@@ -31,7 +31,7 @@ module Qpid # :nodoc:
       # exception then we'll treat it as binary.
       if RUBY_VERSION >= "1.9"
         return true if (value.encoding == "UTF-8" ||
-                        value.force_encoding("UTF-8").valid_encoding?)
+                        value.encode("UTF-8").valid_encoding?)
 
         return false
       else


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to