From: "brightbits (Michael Baldry)" Date: 2021-12-16T09:02:11+00:00 Subject: [ruby-core:106709] [Ruby master Feature#18410] Proposal to make inspect include underscores on numerics Issue #18410 has been updated by brightbits (Michael Baldry). mame (Yusuke Endoh) wrote in #note-2: > Thousands separators may vary depending on locales. See the discussion of #16011. > > Even if we can come to an agreement on the spec, changing `Integer#inspect` may have a big impact. We need to estimate the impact of the incompatibility. It would be good to first implement and try it with some projects like Rails. As mentioned by Martin, I was proposing always using _, as you can in Ruby code, not any kind of locale specific one. Hopefully there would not be incompatibilities, as inspect is specifically meant for human readability, not by code, but I'll look in to applying this change against the Rails code. ---------------------------------------- Feature #18410: Proposal to make inspect include underscores on numerics https://bugs.ruby-lang.org/issues/18410#change-95394 * Author: brightbits (Michael Baldry) * Status: Open * Priority: Normal ---------------------------------------- The documentation for inspect reads "Returns a string containing a human-readable representation of obj." but for large numerical values, while 964218442 is human-readable, 964_218_442 is a lot more readable. The language allows the use of underscores to make numbers more readable, so why should inspect not also honour this? Happy to provide a patch if this would be an acceptable change. -- https://bugs.ruby-lang.org/ Unsubscribe: