String#inpect and String#dump behavior is different from Ruby -------------------------------------------------------------
Key: JRUBY-1726 URL: http://jira.codehaus.org/browse/JRUBY-1726 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Environment: JRuby 1.1b1, latest trunk Reporter: Vladimir Sizikov Attachments: string-inspect-dump-behavior.patch Consider the following: "\010".inspect MRI 1.8.6 and 1.9 print: "\"\\b\"" JRuby prints: "\"\\010\"" This leads to two rubinius spec failures: String#inspect produces a version of self with all nonprinting charaters replaced by \nnn notation FAILED Expected "\"\\000\\001\\002\\003\\004\\005\\006\\a\\010\\t\\n\\v\\f\\r\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\e\\034\\035\\036\\037 !\\\"\\\#$%&'()*+,-./0123456789\"" to equal "\"\\000\\001\\002\\003\\004\\005\\006\\a\\b\\t\\n\\v\\f\\r\\016\\017\\020\\021\\022\\023\\024\\025\\026\\027\\030\\031\\032\\e\\034\\035\\036\\037 !\\\"\\\#$%&'()*+,-./0123456789\"" /opt/work/rubinius/spec/mini_rspec.rb:219:in `==' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:7:in `==' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:6:in `it' /opt/work/rubinius/spec/mini_rspec.rb:414:in `it' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:6:in `it' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:6:in `describe' /opt/work/rubinius/spec/mini_rspec.rb:410:in `describe' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:4:in `describe' /opt/work/rubinius/./spec/core/string/inspect_spec.rb:4:in `load' tmp/last_mspec.rb:13:in `load' tmp/last_mspec.rb:1:in `each' tmp/last_mspec.rb:7:in `each' The proposed patch fixes the problem and two spec failures. -- 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