Sha256: 353278d09dbc59d9f4aef055ef0af3ee8f49b024fcb1b370c38b21c0f67614e9
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
# frozen_string_literal: true require_relative "version/version" module Unicode module Version RB_CONFIG_UNICODE_AVAILABLE = "2.4.0" RB_CONFIG_EMOJI_AVAILABLE = "2.6.0" RUBY_UNICODE_VERSIONS = { 3.0 => "12.1.0", 2.7 => "12.1.0", 2.6 => "12.1.0", "2.6.2" => "12.0.0", "2.6.1" => "11.0.0", "2.6.0" => "11.0.0", 2.5 => "10.0.0", 2.4 => "9.0.0", 2.3 => "8.0.0", 2.2 => "7.0.0", 2.1 => "6.1.0", 2.0 => "6.1.0", 1.9 => "5.2.0", }.freeze RUBY_EMOJI_VERSIONS = { 3.0 => "12.1", 2.7 => "12.1", 2.6 => "12.0", "2.6.1" => "11.0", "2.6.0" => "11.0", 2.5 => "5.0", }.freeze def self.unicode_version(ruby_version = RUBY_VERSION) if ruby_version == RUBY_VERSION && ruby_version >= RB_CONFIG_UNICODE_AVAILABLE RbConfig::CONFIG["UNICODE_VERSION"] else RUBY_UNICODE_VERSIONS[ruby_version] || RUBY_UNICODE_VERSIONS[ruby_version.to_f] end end def self.emoji_version(ruby_version = RUBY_VERSION) if ruby_version == RUBY_VERSION && ruby_version >= RB_CONFIG_EMOJI_AVAILABLE RbConfig::CONFIG["UNICODE_EMOJI_VERSION"] else RUBY_EMOJI_VERSIONS[ruby_version] || RUBY_EMOJI_VERSIONS[ruby_version.to_f] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
unicode-version-1.1.0 | lib/unicode/version.rb |