Project

General

Profile

Feature #12460

Provide Unicode Version information in a better location that UnicodeNormalize::UNICODE_VERSION

Added by duerst (Martin Dürst) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-core:75845]

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.


Related issues

Related to CommonRuby - Feature #12546: Remove UnicodeNormalize::UNICODE_VERSIONClosedActions
Related to Ruby master - Feature #15341: Provide emoji version as RbConfig::CONFIG['UNICODE_EMOJI_VERSION']ClosedActions

Associated revisions

Revision a7ce662a
Added by nobu (Nobuyoshi Nakada) over 3 years ago

Unicode Version in RbConfig

  • tool/mkconfig.rb: provide Unicode Version information as RbConfig::CONFIG['UNICODE_VERSION']. [ruby-core:75845] [Feature #12460]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 55417
Added by nobu (Nobuyoshi Nakada) over 3 years ago

Unicode Version in RbConfig

  • tool/mkconfig.rb: provide Unicode Version information as RbConfig::CONFIG['UNICODE_VERSION']. [ruby-core:75845] [Feature #12460]

Revision 55417
Added by nobu (Nobuyoshi Nakada) over 3 years ago

Unicode Version in RbConfig

  • tool/mkconfig.rb: provide Unicode Version information as RbConfig::CONFIG['UNICODE_VERSION']. [ruby-core:75845] [Feature #12460]

Revision 55417
Added by nobu (Nobuyoshi Nakada) over 3 years ago

Unicode Version in RbConfig

  • tool/mkconfig.rb: provide Unicode Version information as RbConfig::CONFIG['UNICODE_VERSION']. [ruby-core:75845] [Feature #12460]

Revision 55417
Added by nobu (Nobuyoshi Nakada) over 3 years ago

Unicode Version in RbConfig

  • tool/mkconfig.rb: provide Unicode Version information as RbConfig::CONFIG['UNICODE_VERSION']. [ruby-core:75845] [Feature #12460]

History

Updated by shyouhei (Shyouhei Urabe) over 3 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 3 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 3 years ago

Or RbConfig::CONFIG['UNICODE_VERSION']?

Updated by matz (Yukihiro Matsumoto) over 3 years ago

RbConfig::CONFIG['UNICODE_VERSION'] looks just fine.

Matz.

Updated by duerst (Martin Dürst) over 3 years ago

  • Assignee set to duerst (Martin Dürst)

Updated by duerst (Martin Dürst) over 3 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.

#7

Updated by nobu (Nobuyoshi Nakada) over 3 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]
#8

Updated by duerst (Martin Dürst) over 3 years ago

  • Related to Feature #12546: Remove UnicodeNormalize::UNICODE_VERSION added
#9

Updated by duerst (Martin Dürst) 12 months ago

  • Related to Feature #15341: Provide emoji version as RbConfig::CONFIG['UNICODE_EMOJI_VERSION'] added

Also available in: Atom PDF