Feature #12460
closedProvide Unicode Version information in a better location that UnicodeNormalize::UNICODE_VERSION
Description
Currently, the Unicode version used in a specific version of Ruby is available
as UnicodeNormalize::UNICODE_VERSION
, from lib/unicode_normalize/tables.rb
.
It is rather unnatural to have to do
require 'unicode_normalize/normalize'
e.g. in test/ruby/enc/test_case_comprehensive.rb
The Unicode version is also available for make, as $(UNICODE_VERSION)
.
The Unicode version should be available directly in Ruby, e.g. as
RUBY_UNICODE_VERSION
or some such.
Updated by shyouhei (Shyouhei Urabe) over 8 years ago
+1 to avoid require to get that info, but wonder if it is worth adding new toplevel constant. Maybe place it under String:: or Regexp:: ?
Updated by duerst (Martin Dürst) over 8 years ago
Shyouhei Urabe wrote:
Maybe place it under String:: or Regexp:: ?
Anything like that would be fine by me.
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
Or RbConfig::CONFIG['UNICODE_VERSION']
?
Updated by matz (Yukihiro Matsumoto) over 8 years ago
RbConfig::CONFIG['UNICODE_VERSION']
looks just fine.
Matz.
Updated by duerst (Martin Dürst) over 8 years ago
- Assignee set to duerst (Martin Dürst)
Updated by duerst (Martin Dürst) over 8 years ago
- Assignee changed from duerst (Martin Dürst) to nobu (Nobuyoshi Nakada)
If I add e.g.
puts ' CONFIG["UNICODE_VERSION"] = "$(UNICODE_VERSION)"'
as line 185 in tool/mkconfig.rb, I get a line
CONFIG["UNICODE_VERSION"] = "$(UNICODE_VERSION)"
to show up in rbconfig.rb, but in contrast to all the other $(...) variables in that file,
it doesn't get resolved, so that I only get the following:
$ ruby -e 'puts RbConfig::CONFIG["UNICODE_VERSION"]'
$(UNICODE_VERSION)
This is as far as I got, so I'm hoping on some help from Nobu.
Updated by nobu (Nobuyoshi Nakada) over 8 years ago
- Status changed from Open to Closed
Applied in changeset ruby-trunk:r55417.
Unicode Version in RbConfig
- tool/mkconfig.rb: provide Unicode Version information as
RbConfig::CONFIG['UNICODE_VERSION'].
[ruby-core:75845] [Feature #12460]
Updated by duerst (Martin Dürst) over 8 years ago
- Related to Feature #12546: Remove UnicodeNormalize::UNICODE_VERSION added
Updated by duerst (Martin Dürst) about 6 years ago
- Related to Feature #15341: Provide emoji version as RbConfig::CONFIG['UNICODE_EMOJI_VERSION'] added
Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago
- Project changed from 14 to Ruby master