From: mame@... Date: 2019-05-26T03:08:34+00:00 Subject: [ruby-core:92847] [Ruby trunk Bug#15876] 1.to_s.encoding != Encoding.default_internal Issue #15876 has been updated by mame (Yusuke Endoh). @grosser said > I ran into strange looking test output when I compared .to_s with an expected text, saying that the encoding was different I thought that some string-comparison assertions (maybe attributed to an external testing framework?) emitted a spurious warning like "the encoding was different" or something. ---------------------------------------- Bug #15876: 1.to_s.encoding != Encoding.default_internal https://bugs.ruby-lang.org/issues/15876#change-78228 * Author: grosser (Michael Grosser) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.6.3 * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- I ran into strange looking test output when I compared .to_s with an expected text, saying that the encoding was different, which is confusing/annoying especially to users that don't know how encodings work in ruby. 1.to_s.encoding should be the same as "".encoding -- https://bugs.ruby-lang.org/ Unsubscribe: