String#encode(opts) not properly implemented for --1.9
------------------------------------------------------
Key: JRUBY-5633
URL: http://jira.codehaus.org/browse/JRUBY-5633
Project: JRuby
Issue Type: Bug
Components: Ruby 1.9.2
Affects Versions: JRuby 1.6
Environment: jruby-1.6.0, ruby-1.9.2p136
Reporter: Loren Segal
Assignee: Thomas E Enebo
An Encoding::ConverterNotFoundError is raised when String#encode is passed
options as follows:
$ jruby --1.9 -e 'p "hello".encode(:invalid => :replace, :replace => "?")'
Encoding::ConverterNotFoundError: code converter not found
({:invalid=>:replace, :replace=>"?"})
encode at org/jruby/RubyString.java:7151
(root) at -e:1
Ruby 1.9.2p136 handles this fine:
$ ruby192 -e 'p "hello".encode(:invalid => :replace, :replace => "?")'
"hello"
As far as I know, this is a valid usage as per the String#encode docs [1] since
the 'encoding' argument is optional.
[1]: http://rubydoc.info/stdlib/core/String:encode
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email