pax_global_header 0000666 0000000 0000000 00000000064 13617065163 0014522 g ustar 00root root 0000000 0000000 52 comment=5760877851700e120df473f66a74122c9d4e6eb3
backports-3.16.0/ 0000775 0000000 0000000 00000000000 13617065163 0013601 5 ustar 00root root 0000000 0000000 backports-3.16.0/.document 0000664 0000000 0000000 00000000102 13617065163 0015411 0 ustar 00root root 0000000 0000000 lib/**/*.rb
bin/*
features/**/*.feature
-
README.rdoc
LICENSE.txt
backports-3.16.0/.gitignore 0000664 0000000 0000000 00000000077 13617065163 0015575 0 ustar 00root root 0000000 0000000 *.sw?
*.rbc
.DS_Store
coverage
rdoc
pkg
assets
rs
Gemfile.lock
backports-3.16.0/.gitmodules 0000664 0000000 0000000 00000000306 13617065163 0015755 0 ustar 00root root 0000000 0000000 [submodule "spec/rubyspec"]
path = spec/rubyspec
url = git://github.com/ruby/spec.git
[submodule "frozen_old_spec/rubyspec"]
path = frozen_old_spec/rubyspec
url = git://github.com/ruby/spec.git
backports-3.16.0/.irbrc 0000664 0000000 0000000 00000000072 13617065163 0014702 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true
$LOAD_PATH.unshift './lib'
backports-3.16.0/.travis.yml 0000664 0000000 0000000 00000000476 13617065163 0015721 0 ustar 00root root 0000000 0000000 ---
language: ruby
rvm:
- "1.9.3"
- "2.0.0"
- "2.1.0"
- "2.2.0"
- "2.3.0"
- "2.4.0"
- "2.5.0"
- "2.6.0"
- ruby-head
# matrix:
# allow_failures:
# - rvm: ruby-head # Stdlib are creating issues, those will be deleted next version...
before_install:
- git submodule update --init --recursive
backports-3.16.0/CHANGELOG.rdoc 0000664 0000000 0000000 00000025672 13617065163 0015755 0 ustar 00root root 0000000 0000000 = Backports --- History
== Version 3.16.0 - Feb 6th, 2020
Note: {Next major version (X-mas 2020)}[https://github.com/marcandre/backports/issues/139] will drop support for Ruby < 2.2.
* Ruby 2.7 backports
* Array
* +intersection+
* Comparable
* +clamp+ (with range)
* Complex
* +<=>+
* Enumerable
* +filter_map+
* +tally+
* Enumerator
* +produce+ (class method)
* Time
* +floor+, +ceil+
== Version 3.15.0 - May 15th, 2019
* Proc / Method
* +<<+, +>>+
== Version 3.14.0 - April 29th, 2019
* Hash
* +to_h+ (with block)
== Version 3.13.0 - April 5th, 2019
* Hash
* +merge+, +merge!+/+update+ (with multiple arguments)
== Version 3.12.0 - February 20th, 2019
* New Ruby version 2.6.0
* Array
* +difference+, +union+
* +to_h+ (with block)
* Enumerable
* +chain+
* +to_h+ (with block)
* Enumerator::Chain (use Enumerable#chain)
* Kernel
* +then+
* Additional backports for 2.5.0:
* String
* +undump+
== Version 3.11.0 - December 25th, 2017
* New Ruby version 2.5.0
* Array
* +append+, +prepend+
* Dir
* +children+, +each_child+
* Enumerable
* +any?+, +all?+, +none?+, +one?+ (with pattern argument)
* Hash
* +slice+
* +transform_keys+
* Integer
* +sqrt+
* +allbits?+, +anybits?+ and +nobits?+
* Kernel
* +yield_self+
* Module
* +attr+, +attr_accessor+, +attr_reader+, +attr_writer+ (now public)
* +define_method+, +alias_method+, +undef_method+, +remove_method+ (now public)
* String
* +delete_prefix+, +delete_prefix!+
* +delete_suffix+, +delete_suffix!+
* Struct
* +new+ (with keyword_init: true
)
* require 'backports/latest' is now the way to require everything, but is discouraged
== Version 3.10.0 - October 17, 2017
* Additional features of 2.4.0
* Enumerable
* +uniq+
* +sum+
* Hash
* +compact+
* +transform_values+
== Version 3.9.0 - October 07, 2017
* From 2.4.0: +dup+ for +true+, +false+, +nil+, Numeric
* From 2.2.0: Method#super_method
== Version 3.8.0 - April 26, 2017
* From 2.4.0: String#match?, Regexp#match?
* From 2.3.0:
* unary String#+, +-+
* Numeric: +positive?+, +negative?+
* Hash: +to_proc+, +fetch_values+, >, <, >=, <=
* Enumerable: +chunk_while+, +grep_v+
* {Array|Hash|Struct}#dig
* Array#bsearch_index
* From 2.2.0:
* Method#curry
* String#unicode_normalize{|?|!}
* Kernel#itself
* Float: +next_float+, +prev_float+
== Version 3.7.0 - March 28, 2017
* Initiate work on backports of 2.2, 2.3, 2.4
* From 2.4.0:
* Comparable#clamp
* From 2.2.0:
* Enumerable: +slice_when+, +slice_after+
== Version 3.6.0 - February 14th, 2014
* Additional features of 2.1.0
* Bignum#bit_length
* Fixnum#bit_length
* Module#include (now public)
== Version 3.5.0 - February 3rd, 2014
* Additional features of 2.0.0
* Range#size
== Version 3.4.0 - December 29th, 2013
* Additional features of 2.1.0
* Array#to_h, Enumerable#to_h
== Version 3.3.0 - April 3rd, 2013
* Moved `Proc#yield` & `Hash#key` from 1.8.7 to 1.9.1
== Version 3.2.0 - April 2nd, 2013
* Moved `Dir.mktmpdir` to the stdlib 'tmpdir' for Ruby 1.8.7
* Removed `returning` as it is no longer part of Rails.
== Version 3.1.0 - March 5th, 2013
* Backports can now be loaded separately!
* Small tweaks and fixes for many methods to pass more RubySpecs
== Version 3.0.0 - February 24th, 2013
* Features of 2.0.0 are now required when requiring 'backports'.
* Additional features of 2.0.0
* Struct#to_h, NilClass#to_h, Hash#to_h
* Hash#default_proc = nil
* OpenStruct lib
* 1.8.7's Enumerator#with_index (it wasn't in the 1.8.7 NEWS file...)
== Version 2.8.0 - February 3rd, 2013
* Added some features of 2.0.0 (must be required explicitly until official release):
* Array#bsearch
* Range#bsearch
== Version 2.7.0 - January 14th, 2013
* Added some features of 2.0.0 (must be required explicitly until official release):
* Enumerable#lazy
* Enumerator::Lazy
== Version 2.6.0 - May 29th, 2012
* Removed Enumerable#join
== Version 2.5.0 - March 25th, 2012
* Added some features of 1.9.3:
* IO::NULL
* IO#advise
* String#byteslice
* String#prepend
== Version 2.4.0 - March 24th, 2012
* Add backporting for libraries
* Bring libraries up to date:
* Matrix
* Prime
* Set
* Added some features of 1.9.3:
* IO.write, IO.binwrite
* Add forcing backports (must be required explicitly):
* Hash#select (returns a Hash instead of an Array)
* Enumerable / Array#map (returns an enumerator when called without a block)
* String#length, size (for UTF-8 support)
== Version 2.3.0 - May 13th, 2011
* Added Enumerator::Yielder#<<
== Version 2.2.0 - May 13th, 2011
* Ruby 1.8.8 was officially cancelled; code was moved to Ruby 1.9.1 and README updated.
* "".ord now raises an error.
== Version 2.1.0 - April 16th, 2011
* Proc#curry, #lambda (thanks Konstantine Haase)
== Version 2.0.0 - December 5th, 2010
Change of major version because of two small changes that are not quite compatible and because the minor version was getting quite high!
* Remove attempt at faking the new method missing. Unless you used `respond_to_missing` *and* `method(:some_method_handled_with_method_missing)`, you won't see a difference, except better performance (see issue #32) and this fixes some errors (see issue #34)
* Change behavior of array.flatten(0) to match Ruby 1.9 (i.e. return a dup of array, instead of array itself)
== Version 1.18.0 - June 19th, 2010
* Added some features of 1.9.1:
* Math#log2, Math#log with base
* Also fixed Enumerator#each in 1.8.6.
== Version 1.17.0 - May 17th, 2010
* Added some features of 1.9.2:
* Array#repeated_combination, #repeated_permutation
== Version 1.16.2 - April 11th, 2010
* Added some features of 1.9.2:
* Array#uniq, #uniq! (with block)
* Array#product (with block)
* Dir.home
* Hash#keep_if, select!
* Random (new class)
== Version 1.15.0 - March 23rd, 2010
* Added a features of 1.9.2:
* Object#singleton_class
== Version 1.14.0 - March 3rd, 2010
* Added some features of 1.9.2:
* Array#rotate, rotate!
* Array#keep_if, select!
* Array#sort_by!
* Enumerable#join
* Enumerable#slice_before
* Float::INFINITY, NAN
* MatchData#==
== Version 1.13.0 - January 20th, 2010
* Missing for 1.8.7 were
* Array#permutation
* Hash#hash (was only inherited)
* Hash#eql? (was only inherited)
== Version 1.12.0 - December 4th, 2009
* Finer grain includes (see README)
require "backports/1.9" # requires all ruby backports
require "backports/1.9.1" # requires all ruby backports up to 1.9.1 (but not 1.9.2)
* Backported all builtin methods of 1.8.8 (most of which where moved from the 1.9 backports)
* Refreshed README
== Version 1.11.0 - November 4th, 2009
* Added Enumerable#flat_map / collect_concat (Ruby 1.9)
* Added Object#public_send (Ruby 1.9)
* Added Object#public_method (Ruby 1.9)
* bug fixes
== Version 1.10.0 - September 29th, 2009
* Added Enumerable#chunk (Ruby 1.9)
* Added Kernel#respond_to_missing? (Ruby 1.9)
* Completed Process.exec (Ruby 1.8.7)
== Version 1.9.0 - September 4th, 2009
* In Ruby 1.9, most class methods of File accept filenames as String, or convertible via #to_str or #to_path.
File#to_path is also an alias to File#path. These have been backported.
* File.binread (actually IO.binread)
* BasicObject available via "require 'backports/basic_object"
== Version 1.8.4 - September 3rd, 2009
Added Dir.mktmpdir for older version of 1.8.6
== Version 1.8.1 - September 1st, 2009
Added the alias String#lines (Ruby 1.8.7)
== Version 1.8 - August 30, 2009
Backports can be required selectively:
* backports/1.8.7
* backports/1.9 (which include 1.8.7)
* rails
== Version 1.8 - August 30, 2009
Backports can be required selectively:
* backports/1.8.7
* backports/1.9 (which include 1.8.7)
* rails
== Version 1.7.1 - August 20, 2009
Enumerable#take and Enumerable#first(n) are now returning as soon as possible. Previously, #each was yielding one element too many. See redmine issue #1554.
== Version 1.7 - May 27, 2009
Porting all 1.8.7 features to rubinius was quite enlightening (http://blog.marc-andre.ca/2009/05/schizo-ruby-puzzle.html ).
Many improvements were made to be consistent with MRI, e.g. converting arguments using to_int if needed, etc...
The changes are now reflected in 'backports'.
Some IO and ARGF methods were missing and are now complete.
== Version 1.6.6 - April 30, 2009
Important bug fix. String#gsub is left alone until I find a good way to modify it.
== Version 1.6 - April 29, 2009
Completed backport to 1.8.7.
* Array
* extract_options!
* Binding
* +eval+
* Dir
* +each+, +foreach+
* Enumerator
* +new+
* +with_object+
* +next+, +rewind+
* Hash
* Optional block for delete_if, each, each_key, each_pair, each_value, reject!, select (and ENV)
* Integer
* moved stuff out of Fixnum
* Optional block for +downto+, +times+, +upto+
* IO
* Optional block for +each+, +each_line+, +each_byte+, +foreach+ (and ARGF)
* Kernel
* +loop+, +StopIteration+
* +__method__+, +__callee__+
* Method
* +name+, +owner+, +receiver+
* Module
* +class_exec+, +module_exec+
* Numeric
* +step+
* Object
* +define_singleton_method+
* +instance_exec+
* ObjectSpace
* +each_object+
* Range
* Optional block for +each+, +step+
* Regexp
* +union+
* String
* +try_convert+
* ascii_only?
* +bytesize+
* +chr+
* +clear+
* +codepoints+, +each_codepoint+
* +stringify_keys+, +stringify_keys!+
* +each+, +each_line+, +each_byte+
* +gsub+
* +upto+
* Struct
* +each+, +each_pair+
* Symbol
* <=>, +casecmp+
* +capitalize+, +downcase+, +next+, +succ+, +swapcase+, +upcase+
* =~, [], empty?, length, match, size
* UnboundMethod
* +name+, +owner+
== Version 1.5 - April 24, 2009
* Array (completed)
* +combination+
* +try_convert+
* Optional block for collect!, :map!, :each, :each_index, :reject, :reject!, :delete_if
* +pop+, +shift+
* +product+
* Fixnum (completed)
* +div+, +fdiv+
* +succ+
* +magnitude+
* Enumerable (completed)
* +each_with_object+
* +inject+
* +max_by+, +min_by+, +minmax+, +minmax_by+
* +reduce+
* +to_a+
== Version 1.4 - April 21, 2009
* String
* +rpartition+
* Proc
* +yield+
== Version 1.3 - April 17, 2009
* Enumerable
* none?
* Array
* +sample+, +shuffle+, +shuffle!+
* String
* +each_char+, +chars+
* +partition+
Tests and fixes for String#start_with? and String#end_with?
== Version 1.2 - April 12, 2009
* Array
* +reverse_each+
* +cycle+
* Enumerable
* +reverse_each+
* +each_slice+, +each_cons+
* +count+
* +cycle+
* +group_by+
* Hash
* default_proc=
== Version 1.1 - April 11, 2009
* Array
* +flatten+, flatten!
* +find_index+, +index+
* Hash
* +reverse_merge+, reverse_merge!
== Version 1.0 - April 2nd, 2009
=== Initial release.
backports-3.16.0/Gemfile 0000664 0000000 0000000 00000001401 13617065163 0015070 0 ustar 00root root 0000000 0000000 source "http://rubygems.org"
# Declare your gem's dependencies in backports.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec
# jquery-rails is used by the dummy application
group :test do
gem "rake"
gem 'mspec'
gem 'activesupport', '~>3.2.0'
gem 'minitest', '< 5.0.0', :require => false
gem 'test-unit', '~>2.1.1.0'
end
# Declare any dependencies that are still in development here instead of in
# your gemspec. These might include edge Rails or gems from your path or
# Git. Remember to move these dependencies to your gemspec before releasing
# your gem to rubygems.org.
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
backports-3.16.0/LICENSE.txt 0000664 0000000 0000000 00000002050 13617065163 0015421 0 ustar 00root root 0000000 0000000 Copyright (c) 2009 Marc-Andre Lafortune
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
backports-3.16.0/README.rdoc 0000664 0000000 0000000 00000026010 13617065163 0015406 0 ustar 00root root 0000000 0000000 = Backports Library {
}[https://travis-ci.org/marcandre/backports] {
}[http://badge.fury.io/rb/backports]
Yearning to use some of the new cool features in Ruby 2.7 while using 2.3.x? Have some legacy code in Ruby 1.8 but can't live without `flat_map`?
This gem is for you!
The goal of 'backports' is to make it easier to write ruby code that runs across different versions of Ruby.
Note: {Next major version (X-mas 2020)}[https://github.com/marcandre/backports/issues/139] will drop support for Ruby < 2.2.
== Loading backports
=== Explicitly (recommended)
For example, if you want to use transform_values and transform_keys, even in Ruby implementations that don't include it:
require 'backports/2.4.0/hash/transform_values'
require 'backports/2.5.0/hash/transform_keys'
This will enable Hash#transform_values and Hash#transform_keys, using the native versions if available or otherwise provide a pure Ruby version.
=== By Module
To bring all the backports for a given Class/Module, you can specify only that Class:
require 'backports/2.3.0/hash'
This will make sure that Hash responds to dig, fetch_values, <, <=, >, >= and to_proc
=== Up to a specific Ruby version
You can load all backports up to a specific version. For example, to bring any version of Ruby mostly up to Ruby 2.4.0's standards:
require 'backports/2.4.0'
This will bring in all the features of 1.8.7 and many features of Ruby 1.9.x all the way up to Ruby 2.4.0 (for all versions of Ruby)!
While it is not recommended, you may `require 'backports/latest'` as a shortcut to the latest Ruby version supported. This is equivalent to the deprecated `require 'backports'`.
+Note+: Although I am a Ruby committer, this gem is a personal project and is not endorsed by ruby-core.
== What's inside
Goals for backported features:
1. Won't break older code
2. Pure Ruby (no C extensions)
3. Pass ruby/spec[https://github.com/ruby/spec]
Let's be a bit more precise about the "breaking code" business. It is of course entirely possible that code will break. In particular, you may be distinguishing parameters with duck typing, but a builtin class may, in the future, be responding to a particular call. Here's {an exemple from Rails}(https://github.com/rails/rails/blob/a4b55827721a5967299f3c1531afb3d6d81e4ac0/activerecord/lib/active_record/associations/association.rb#L155-L159) that is relying on the fact that Proc and Method respond to :to_proc and Hash isn't. That is, until Ruby 2.3... This old version of Rails therefore won't work on Ruby 2.3, or on older Rubies with that the `2.3.0/hash/to_proc` loaded...
For Ruby < 2.0, there are some real incompatibilities. For example, Module::instance_methods which returns strings in 1.8 and symbols in 1.9. No change can be made without the risk of breaking existing code. Such incompatibilities are left unchanged, although you can require some of these changes in addition (see below).
== Installation & compatibility
+backports+ can be installed with:
gem install backports
To use:
require 'rubygems'
# For only specific backports:
require 'backports/1.9.1/kernel/require_relative'
require 'backports/2.0.0/enumerable/lazy'
# For all backports up to a given version
require 'backports/1.9.2' # All backports for Ruby 1.9.2 and below
Note: about a dozen of backports have a dependency that will be also loaded. For example, the backport of Enumerable#flat_map uses flatten(1), so if required from Ruby 1.8.6 (where Array#flatten does not accept an argument), the backport for Ruby's 1.8.7 flatten with an argument will also be loaded.
With bundler, add to your Gemfile:
gem 'backports', :require => false
Run bundle install and require the desired backports.
Compatible with Ruby itself, JRuby and Rubinius.
= Complete List of backports
== Ruby 2.7 backports
* Array
* +intersection+
* Comparable
* +clamp+ (with range)
* Complex
* +<=>+
* Enumerable
* +filter_map+
* +tally+
* Enumerator
* +produce+ (class method)
* Time
* +floor+, +ceil+
== Ruby 2.6 backports
* Array
* +difference+, +union+
* +to_h+ (with block)
* Enumerable
* +chain+
* +to_h+ (with block)
* Enumerator::Chain (use Enumerable#chain)
* Hash
* +merge+, +merge!+/+update+ (with multiple arguments)
* +to_h+ (with block)
* Kernel
* +then+
* Method
* +<<+, +>>+
* Proc
* +<<+, +>>+
== Ruby 2.5 backports
* Array
* +append+, +prepend+
* Dir
* +children+, +each_child+
* Enumerable
* +any?+, +all?+, +none?+, +one?+ (with pattern argument)
* Hash
* +slice+
* +transform_keys+
* Integer
* +sqrt+
* +allbits?+, +anybits?+ and +nobits?+
* Kernel
* +yield_self+
* Module
* +attr+, +attr_accessor+, +attr_reader+, +attr_writer+ (now public)
* +define_method+, +alias_method+, +undef_method+, +remove_method+ (now public)
* String
* +delete_prefix+, +delete_prefix!+
* +delete_suffix+, +delete_suffix!+
* +undump+
* Struct
* +new+ (with keyword_init: true
)
== Ruby 2.4 backports
* Comparable
* +clamp+
* Enumerable
* +sum+
* +uniq+
* Hash
* +compact+, +compact!+
* +transform_values+, +transform_values!+
* Regexp
* +match?+
* String
* +match?+
* FalseClass, Fixnum, Float, NilClass, TrueClass
* +dup+
== Ruby 2.3 backports
* Array
* +bsearch_index+
* +dig+
* Enumerable
* +chunk_while+
* +grep_v+
* Hash
* +dig+
* +fetch_values+
* +to_proc+
* <=, <, >=, >
* Numeric
* +negative?+
* +positive?+
* String
* unary + and -
* Struct
* +dig+
== Ruby 2.2 backports
* Enumerable
* +slice_after+
* +slice_when+
* Float
* +prev_float+
* +next_float+
* Kernel
* +itself+
* Method
* +curry+
* +super_method+
* String
* +unicode_normalize+
* +unicode_normalize!+
* +unicode_normalize?+
== Ruby 2.1 backports
* Array
* +to_h+
* Bignum
* +bit_length+
* Enumerable
* +to_h+
* Fixnum
* +bit_length+
* Module
* +include+ (now public)
== Ruby 2.0 backports
* Array
* +bsearch+
* Enumerable
* +lazy+
* Enumerator::Lazy
* all methods
* Hash
* default_proc= (with nil argument)
* +to_h+
* nil.to_h
* Range
* +bsearch+
* Struct
* +to_h+
== Ruby 1.9.3 backports
* File
* +NULL+
* IO
* +advise+ (acts as a noop)
* +write+, +binwrite+
* String
* +byteslice+
* +prepend+
== Ruby 1.9.2 backports
* Array
* rotate, rotate!
* keep_if, select!
* +product+ (with block)
* +repeated_combination+, +repeated_permutation+
* sort_by!
* uniq, uniq! (with block)
* Complex
* +to_r+
* Dir
* +home+
* Enumerable
* +chunk+
* +flat_map+, +collect_concat+
* +join+
* +slice_before+
* Float::INFINITY, NAN
* Hash
* +keep_if+, select!
* Object
* singleton_class
* Random (new class)
*Note*: The methods of +Random+ can't be required individually; the class can only be required whole with require 'backports/1.9.2/random'.
== Ruby 1.9.1 backports
Additionally, the following Ruby 1.9 features have been backported:
* Array
* +try_convert+
* +sample+
* Enumerable
* +each_with_object+
* +each_with_index+ (with arguments)
* Enumerator
* +new+ (with block)
* File
* +binread+
* +to_path+
* All class methods accepting filenames will accept files or anything with a #to_path method.
* File.open accepts an options hash.
* Float
* +round+
* Hash
* +assoc+, +rassoc+
* +key+
* +try_convert+
* default_proc=
* Integer
* +magnitude+
* +round+
* IO
* +bin_read+
* +try_convert+
* +ungetbyte+
* IO.open accepts an options hash.
* Kernel
* +require_relative+
* Math
* +log+ (with base)
* +log2+
* Numeric
* +round+
* Object
* +define_singleton_method+
* +public_method+
* +public_send+
* Proc
* +yield+
* +lambda?+
* +curry+
* ===
* Range
* cover?
* Regexp
* +try_convert+
* String
* ascii_only?
* +chr+
* +clear+
* +codepoints+, +each_codepoint+
* +get_byte+, +set_byte+
* +ord+
* +try_convert+
+Enumerator+ can be accessed directly (instead of Enumerable::Enumerator)
To include _only_ these backports and those of the 1.8 line, require "backports/1.9.1".
Moreover, a pretty good imitation of +BasicObject+ is available,
but since it is only an imitation, it must be required explicitly:
require 'backports/basic_object'
== Ruby 1.8.7
Complete Ruby 1.8.7 backporting (core language). Refer to the official list of changes[https://github.com/ruby/ruby/blob/ruby_1_8_7/NEWS]. That's about 130 backports!
Only exceptions:
* String#gsub (the form returning an enumerator)
* GC.stress= (not implemented)
* Array#choice (removed in 1.9, use 1.9.1's Array#sample instead)
== Libraries
Libraries are slowly being backported. You simply require them as usual after requiring 'backports/std_lib'. Requiring 'backports/std_lib' after the standard libraries is also supported.
require "backports/std_lib"
require "prime"
42.prime? # => false, even in Ruby 1.8.x
The following libraries are up to date with Ruby 1.9.3:
* Matrix
* Prime
* Set
The following library is to date with Ruby 2.0.0:
* OpenStruct (ostruct)
I am aware of the following backport gem, which probably won't make it into this gem:
* Net::SMTP for Ruby 1.8.6: smtp_tls[http://seattlerb.rubyforge.org/smtp_tls/]
Requiring backports for a given version of Ruby will also load 'backports/std_lib'.
== Forcing incompatibilities
Some backports would create incompatibilities in their current Ruby version but could be useful in some projects. It is possible to request such incompatible changes. Backports currently supports the following:
* Hash
* +select+ (returns a Hash instead of an Array)
* Enumerable / Array
* +map+ (returns an enumerator when called without a block)
* String
* +length+, +size+ (for UTF-8 support)
These must be imported in addition to the backports gem, for example:
require "backports/force/hash_select"
{}.select{} # => {}, even in Ruby 1.8
== Thanks
Thanks for the bug reports and patches, in particular the repeat offenders:
* Arto Bendiken ( bendiken[http://github.com/bendiken] )
* Konstantin Haase ( rkh[https://github.com/rkh])
* Roger Pack ( rdp[http://github.com/rdp] )
== Contributing
The best way to submit a patch is to also submit a patch to ruby/spec[https://github.com/ruby/spec] and then a patch to backports that make it pass the spec.
See below to test rubyspec. Note that only features missing from your Ruby version are tested.
git submodule init && git submodule update # => pulls rubyspecs
bundle install
bundle exec rake spec[hash/slice] # => tests Hash#slice (must be in Ruby 2.4 or less)
bundle exec rake spec[hash/*] # => tests all backported Hash methods
bundle exec rake spec (or rake spec[*/*]) # => all rubyspecs for backported methods
Failures that are acceptable are added the to `tags` file.
= License
+backports+ is released under the terms of the MIT License, see the included LICENSE file.
Author:: Marc-André Lafortune
backports-3.16.0/Rakefile 0000664 0000000 0000000 00000014452 13617065163 0015254 0 ustar 00root root 0000000 0000000 begin
require "bundler/gem_tasks"
rescue LoadError
# bundler not installed
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = false
end
class SpecRunner
STATS = [:files, :examples, :expectations, :failures, :errors]
attr_reader :stats, :not_found
def initialize
@counts = [0] * 5
@not_found = []
end
def run(cmd, path)
result = `#{cmd}`
match = result.match(/(\d+) files?, (\d+) examples?, (\d+) expectations?, (\d+) failures?, (\d+) errors?/)
if match.nil?
puts "*** mspec returned with unexpected results:"
puts result
puts "Command was:", cmd
exit
end
_, ex, p, f, e = data = match.captures.map{|x| x.to_i}
not_found << path if ex == 0
STATS.each_with_index do |_, i|
@counts[i] += data[i]
end
if f + e > 0
puts cmd
puts result
else
print "."
STDOUT.flush
end
end
def stats
h = {}
STATS.zip(@counts).each{|k, v| h[k]=v}
h
end
def report
puts "*** Overall:", stats.map{|a| a.join(' ')}.join(', ')
puts "No spec found for #{@not_found.join(', ')}" unless @not_found.empty?
end
def success?
stats[:failures] == 0 && stats[:errors] == 0
end
end
desc "Run specs, where path can be '*/*' (default), 'class/*' or 'class/method'."
task :spec, :path, :action do |t, args|
args.with_defaults(:path => '*/*', :action => 'ci')
specs = SpecRunner.new
# Avoid unclear error message by checking if at least one spec exists in the old specs
has_frozen_spec = !Dir.glob('frozen_old_spec/rubyspec/core/#{path}_spec.rb')
if has_frozen_spec || RUBY_VERSION < '1.9'
mspec_cmds(args[:path], 'frozen_old_spec', args[:action]) do |cmd, path|
specs.run(cmd, path)
end
end
unless RUBY_VERSION < '1.9' # Give up entirely on running new specs in 1.8.x, mainly because of {hash: 'syntax'}
mspec_cmds(args[:path], 'spec', args[:action]) do |cmd, path|
specs.run(cmd, path)
end
end
specs.report
fail unless specs.success?
end
task :all_spec do # Necessary because of argument passing bug in 1.8.7
Rake::Task[:spec].invoke
end
desc "Same as spec, but creating tags for failures"
task :spec_tag, :path do |t, args|
Rake::Task[:spec].invoke(args[:path], 'tag -G fails')
end
task :default => [:test, :all_spec]
DEPENDENCIES = Hash.new([]).merge!(
'1.8.7/argf/chars' => 'backports/1.8.7/string/each_char',
'1.8.7/argf/each_char' => 'backports/1.8.7/string/each_char',
'1.8.7/array/cycle' => 'backports/1.8.7/stop_iteration',
'1.8.7/enumerable/entries' => ['backports/1.8.7/enumerable/each_with_index', 'backports/1.8.7/enumerable/to_a'],
'1.8.7/enumerator/rewind' => 'backports/1.8.7/enumerator/next',
'1.8.7/hash/reject' => 'backports/1.8.7/integer/even',
'1.9.1/hash/rassoc' => 'backports/1.9.1/hash/key',
'1.9.1/proc/lambda' => 'backports/1.9.1/proc/curry',
'1.9.2/complex/to_r' => 'complex',
'1.9.2/array/select' => 'backports/1.8.7/array/select',
'1.9.2/hash/select' => 'backports/1.8.7/hash/select',
'1.9.2/enumerable/each_entry' => 'backports/1.8.7/enumerable/each_with_index',
'2.0.0/hash/to_h' => 'backports/1.9.1/hash/default_proc',
'2.2.0/float/next_float' => 'backports/2.2.0/float/prev_float',
'2.2.0/float/prev_float' => 'backports/2.2.0/float/next_float',
'2.3.0/array/bsearch_index' => ['backports/2.3.0/array/dig', 'backports/2.3.0/hash/dig'],
'2.3.0/array/dig' => ['backports/2.3.0/hash/dig', 'backports/2.3.0/struct/dig'],
'2.3.0/hash/dig' => ['backports/2.3.0/array/dig', 'backports/2.3.0/struct/dig'],
'2.3.0/struct/dig' => ['backports/2.3.0/array/dig', 'backports/2.3.0/hash/dig'],
'2.7.0/enumerable/tally' => ['backports/2.4.0/hash/transform_values', 'backports/2.2.0/kernel/itself'],
)
{
:each_with_index => %w[enumerable/detect enumerable/find enumerable/find_all enumerable/select enumerable/to_a],
:first => %w[enumerable/cycle io/bytes io/chars io/each_byte io/each_char io/lines io/each_line]
}.each do |req, libs|
libs.each{|l| DEPENDENCIES["1.8.7/#{l}"] = "backports/1.8.7/enumerable/#{req}" }
end
# These **old** specs cause actual errors while loading in 1.8:
OLD_IGNORE_IN_18 = %w[
1.9.1/symbol/length
1.9.1/symbol/size
1.9.3/string/byteslice
1.8.7/proc/yield
1.9.1/proc/case_compare
2.4.0/string/match
2.4.0/regexp/match
2.5.0/module/define_method
]
# These **new** specs cause actual errors while loading in 1.9:
IGNORE_IN_19 = %w[
2.1.0/enumerable/to_h
2.1.0/array/to_h
2.1.0/module/include
2.2.0/kernel/itself
2.5.0/module/define_method
2.5.0/module/alias_method
2.5.0/module/undef_method
2.5.0/module/remove_method
2.5.0/module/attr
2.5.0/module/attr_reader
2.5.0/module/attr_writer
2.5.0/module/attr_accessor
2.5.0/struct/new
]
# These **new** specs cause actual errors while loading in 2.0.0:
IGNORE_IN_200 = %w[
2.4.0/enumerable/sum
]
CLASS_MAP = Hash.new{|k, v| k[v] = v}.merge!(
'match_data' => 'matchdata', # don't ask me why RubySpec uses matchdata instead of match_data
'true_class' => 'true',
'false_class' => 'false',
'nil_class' => 'nil'
)
EXTRA_SPECS = {
'enumerable/chain' => %w[enumerator/chain/*]
}
def mspec_cmds(pattern, spec_folder, action='ci')
pattern = "lib/backports/*.*.*/#{pattern}.rb"
Dir.glob(pattern) do |lib_path|
_match, version, path = lib_path.match(/backports\/(\d\.\d\.\d)\/(.*)\.rb/).to_a
next if path =~ /stdlib/
next if version <= RUBY_VERSION
version_path = "#{version}/#{path}"
if RUBY_VERSION < '2.0.0'
next if OLD_IGNORE_IN_18.include? version_path if RUBY_VERSION < '1.9'
next if IGNORE_IN_19.include? version_path
next if spec_folder != 'frozen_old_spec' && version <= '2.0.0' # Don't run new specs for pre 2.0 features & ruby
end
next if RUBY_VERSION < '2.1.0' && IGNORE_IN_200.include?(version_path)
deps = [*DEPENDENCIES[version_path]].map{|p| "-r #{p}"}.join(' ')
klass, method = path.split('/')
path = [CLASS_MAP[klass], method].join('/')
spec_paths = [path, *EXTRA_SPECS[path]].map {|p| "#{spec_folder}/rubyspec/core/#{p}_spec.rb" }
yield %W[mspec #{action}
-I lib
-r ./set_version/#{version}
#{deps}
-r backports/#{version_path}
#{spec_paths.join(' ')}
].join(' '), path
end
end
backports-3.16.0/backports.gemspec 0000664 0000000 0000000 00000002210 13617065163 0017131 0 ustar 00root root 0000000 0000000 # -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'backports/version'
Gem::Specification.new do |gem|
gem.name = "backports"
gem.version = Backports::VERSION
gem.authors = ["Marc-André Lafortune"]
gem.email = ["github@marc-andre.ca"]
gem.description = %q{Essential backports that enable many of the nice features of Ruby for earlier versions.}
gem.summary = %q{Backports of Ruby features for older Ruby.}
gem.homepage = "http://github.com/marcandre/backports"
gem.license = "MIT"
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ["lib"]
if gem.respond_to?(:metadata)
gem.metadata['changelog_uri'] = 'https://github.com/marcandre/backports/blob/master/CHANGELOG.rdoc'
gem.metadata['source_code_uri'] = 'https://github.com/marcandre/backports'
gem.metadata['bug_tracker_uri'] = 'https://github.com/marcandre/backports/issues'
end
end
backports-3.16.0/default.mspec 0000664 0000000 0000000 00000001071 13617065163 0016255 0 ustar 00root root 0000000 0000000 if (Backports::TARGET_VERSION rescue false) # Conf loaded at different times, not sure why
class MSpecScript
# The set of substitutions to transform a spec filename
# into a tag filename.
main_version = RUBY_VERSION
unless File.exist?(File.expand_path("../lib/backports/#{main_version}.rb", __FILE__))
main_version = main_version.sub(/\.\d+$/, '.0')
end
set :tags_patterns, [ [%r(rubyspec/), "tags/#{main_version}/"] ]
end
SpecGuard.ruby_version_override = Backports::TARGET_VERSION if Backports::TARGET_VERSION > RUBY_VERSION
end
backports-3.16.0/frozen_old_spec/ 0000775 0000000 0000000 00000000000 13617065163 0016754 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/rubyspec/ 0000775 0000000 0000000 00000000000 13617065163 0020610 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/ 0000775 0000000 0000000 00000000000 13617065163 0017712 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/ 0000775 0000000 0000000 00000000000 13617065163 0020364 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/ 0000775 0000000 0000000 00000000000 13617065163 0021314 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/argf/ 0000775 0000000 0000000 00000000000 13617065163 0022233 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/argf/each_line_spec.rb 0000664 0000000 0000000 00000000520 13617065163 0025476 0 ustar 00root root 0000000 0000000 fails:ARGF.each_line is a public method
fails:ARGF.each_line requires multiple arguments
fails:ARGF.each_line reads each line of files
fails:ARGF.each_line returns self when passed a block
fails:ARGF.each_line returns an Enumerator when passed no block
fails:ARGF.each_line with a separator yields each separated section of all streams
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/argf/each_spec.rb 0000664 0000000 0000000 00000000462 13617065163 0024474 0 ustar 00root root 0000000 0000000 fails:ARGF.each is a public method
fails:ARGF.each requires multiple arguments
fails:ARGF.each reads each line of files
fails:ARGF.each returns self when passed a block
fails:ARGF.each returns an Enumerator when passed no block
fails:ARGF.each with a separator yields each separated section of all streams
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/argf/lines_spec.rb 0000664 0000000 0000000 00000000470 13617065163 0024705 0 ustar 00root root 0000000 0000000 fails:ARGF.lines is a public method
fails:ARGF.lines requires multiple arguments
fails:ARGF.lines reads each line of files
fails:ARGF.lines returns self when passed a block
fails:ARGF.lines returns an Enumerator when passed no block
fails:ARGF.lines with a separator yields each separated section of all streams
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/array/ 0000775 0000000 0000000 00000000000 13617065163 0022432 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/array/append_spec.rb 0000664 0000000 0000000 00000000067 13617065163 0025243 0 ustar 00root root 0000000 0000000 fails:Array#<< raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/array/collect_spec.rb 0000664 0000000 0000000 00000000753 13617065163 0025423 0 ustar 00root root 0000000 0000000 fails:Array#collect returns an Enumerator when no block given
fails:Array#collect does not copy untrusted status
fails:Array#collect! keeps untrusted status
fails:Array#collect! when frozen raises a RuntimeError
fails:Array#collect! when frozen raises a RuntimeError when empty
fails:Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator
fails:Array#collect! when frozen raises a RuntimeError when calling #each on the returned Enumerator when empty
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/array/rotate_spec.rb 0000664 0000000 0000000 00000000176 13617065163 0025273 0 ustar 00root root 0000000 0000000 fails:Array#rotate returns subclass instance for Array subclasses
fails:Array#rotate! raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/array/uniq_spec.rb 0000664 0000000 0000000 00000000363 13617065163 0024747 0 ustar 00root root 0000000 0000000 fails:Array#uniq! raises a RuntimeError on a frozen array when the array is modified
fails:Array#uniq! raises a RuntimeError on a frozen array when the array would not be modified
fails:Array#uniq! doesn't yield to the block on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/complex/ 0000775 0000000 0000000 00000000000 13617065163 0022763 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/complex/to_r_spec.rb 0000664 0000000 0000000 00000000526 13617065163 0025270 0 ustar 00root root 0000000 0000000 fails:Complex#to_r when the imaginary part is Fixnum 0 returns the result of sending #to_r to the real part
fails:Complex#to_r when the imaginary part is Rational 0 returns the result of sending #to_r to the real part
fails:Complex#to_r when the imaginary part responds to #== 0 with true returns the result of sending #to_r to the real part
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023433 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/all_spec.rb 0000664 0000000 0000000 00000000134 13617065163 0025540 0 ustar 00root root 0000000 0000000 fails:Enumerable#all? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000246 13617065163 0025563 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
fails:Enumerable#any? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/each_entry_spec.rb 0000664 0000000 0000000 00000000122 13617065163 0027106 0 ustar 00root root 0000000 0000000 fails:Enumerable#each_entry passes through the values yielded by #each_with_index
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/none_spec.rb 0000664 0000000 0000000 00000000137 13617065163 0025732 0 ustar 00root root 0000000 0000000 fails:Enumerable#none? with a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerable/one_spec.rb 0000664 0000000 0000000 00000000145 13617065163 0025553 0 ustar 00root root 0000000 0000000 fails:Enumerable#one? when passed a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerator/ 0000775 0000000 0000000 00000000000 13617065163 0023475 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/enumerator/next_spec.rb 0000664 0000000 0000000 00000000104 13617065163 0026005 0 ustar 00root root 0000000 0000000 fails:Enumerator#next is rewound after encountering a StopIteration
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/env/ 0000775 0000000 0000000 00000000000 13617065163 0022104 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/env/to_h_spec.rb 0000664 0000000 0000000 00000000152 13617065163 0024372 0 ustar 00root root 0000000 0000000 fails:ENV.to_hash uses the locale encoding for keys
fails:ENV.to_hash uses the locale encoding for values
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/ 0000775 0000000 0000000 00000000000 13617065163 0022233 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/join_spec.rb 0000664 0000000 0000000 00000000265 13617065163 0024534 0 ustar 00root root 0000000 0000000 fails:File.join flattens nested arrays
fails:File.join inserts the separator in between empty strings and arrays
fails:File.join raises an ArgumentError if passed a recursive array
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/lchmod_spec.rb 0000664 0000000 0000000 00000000155 13617065163 0025041 0 ustar 00root root 0000000 0000000 fails:File.lchmod returns false from #respond_to?
fails:File.lchmod raises a NotImplementedError when called
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/new_spec.rb 0000664 0000000 0000000 00000000207 13617065163 0024362 0 ustar 00root root 0000000 0000000 fails:File.new returns a new File when use File::APPEND mode
fails:File.new returns a new File when use File::RDONLY|File::APPEND mode
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/open_spec.rb 0000664 0000000 0000000 00000001576 13617065163 0024544 0 ustar 00root root 0000000 0000000 fails:File.open on a FIFO opens it as a normal file
fails:File.open opens file when call with a block (basic case)
fails:File.open opens a file with mode string and block
fails:File.open opens a file with mode num and block
fails:File.open opens the file when passed mode, num, permissions and block
fails:File.open opens the file when call with fd
fails:File.open opens a file with a file descriptor d and a block
fails:File.open raises a SystemCallError if passed an invalid Integer type
fails:File.open raises an IOError when read in a block opened with File::RDONLY|File::APPEND mode
fails:File.open raises an IOError if the file exists when open with File::RDONLY|File::APPEND
fails:File.open defaults external_encoding to ASCII-8BIT for binary modes
fails:File.open when passed a file descriptor opens a file
fails:File.open when passed a file descriptor opens a file when passed a block
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/file/to_path_spec.rb 0000664 0000000 0000000 00000000066 13617065163 0025232 0 ustar 00root root 0000000 0000000 fails:File#to_path preserves the encoding of the path
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/fixnum/ 0000775 0000000 0000000 00000000000 13617065163 0022622 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/fixnum/fdiv_spec.rb 0000664 0000000 0000000 00000000060 13617065163 0025105 0 ustar 00root root 0000000 0000000 fails:Fixnum#fdiv follows the coercion protocol
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/gc/ 0000775 0000000 0000000 00000000000 13617065163 0021705 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/gc/stress_spec.rb 0000664 0000000 0000000 00000000137 13617065163 0024570 0 ustar 00root root 0000000 0000000 fails:GC.stress returns current status of GC stress mode
fails:GC.stress= sets the stress mode
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/ 0000775 0000000 0000000 00000000000 13617065163 0022237 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/assoc_spec.rb 0000664 0000000 0000000 00000000124 13617065163 0024703 0 ustar 00root root 0000000 0000000 fails:Hash#assoc only returns the first matching key-value pair for identity hashes
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/constructor_spec.rb 0000664 0000000 0000000 00000000314 13617065163 0026161 0 ustar 00root root 0000000 0000000 fails:Hash.[] raises an ArgumentError for arrays of more than 2 elements
fails:Hash.[] raises an ArgumentError when passed a list of value-invalid-pairs in an array
fails:Hash.[] removes the default_proc
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/default_proc_spec.rb 0000664 0000000 0000000 00000000322 13617065163 0026242 0 ustar 00root root 0000000 0000000 fails:Hash#default_proc= raises an error if passed nil
fails:Hash#default_proc= raises a TypeError if passed a lambda with an arity other than 2
fails:Hash#default_proc= raises a RuntimeError if self is frozen
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/delete_if_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025510 0 ustar 00root root 0000000 0000000 fails:Hash#delete_if raises a RuntimeError if called on a frozen instance
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/each_pair_spec.rb 0000664 0000000 0000000 00000000136 13617065163 0025511 0 ustar 00root root 0000000 0000000 fails:Hash#each_pair yields a [[key, value]] Array for each pair to a block expecting |*args|
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/eql_spec.rb 0000664 0000000 0000000 00000000266 13617065163 0024363 0 ustar 00root root 0000000 0000000 fails:Hash#eql? computes equality for recursive hashes
fails:Hash#eql? computes equality for complex recursive hashes
fails:Hash#eql? computes equality for recursive hashes & arrays
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/hash_spec.rb 0000664 0000000 0000000 00000000304 13617065163 0024516 0 ustar 00root root 0000000 0000000 fails:Hash#hash generates a hash for recursive hash structures
fails:Hash#hash returns the same hash for recursive hashes
fails:Hash#hash returns the same hash for recursive hashes through arrays
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/keep_if_spec.rb 0000664 0000000 0000000 00000000221 13617065163 0025173 0 ustar 00root root 0000000 0000000 fails:Hash#keep_if raises an RuntimeError if called on a frozen instance
fails:Hash#keep_if raises a RuntimeError if called on a frozen instance
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/rassoc_spec.rb 0000664 0000000 0000000 00000000101 13617065163 0025060 0 ustar 00root root 0000000 0000000 fails:Hash#rassoc only returns the first matching key-value pair
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/reject_spec.rb 0000664 0000000 0000000 00000000274 13617065163 0025055 0 ustar 00root root 0000000 0000000 fails:Hash#reject! raises a RuntimeError if called on a frozen instance that is modified
fails:Hash#reject! raises a RuntimeError if called on a frozen instance that would not be modified
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/hash/select_spec.rb 0000664 0000000 0000000 00000001140 13617065163 0025051 0 ustar 00root root 0000000 0000000 fails:Hash#select returns a Hash of entries for which block is true
fails:Hash#select! is equivalent to keep_if if changes are made
fails:Hash#select! returns nil if no changes were made
fails:Hash#select! raises a RuntimeError if called on an empty frozen instance
fails:Hash#select! raises a RuntimeError if called on a frozen instance that would not be modified
fails:Hash#select! returns an Enumerator if called on a non-empty hash without a block
fails:Hash#select! returns an Enumerator if called on an empty hash without a block
fails:Hash#select! returns an Enumerator if called on a frozen instance
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/integer/ 0000775 0000000 0000000 00000000000 13617065163 0022751 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/integer/round_spec.rb 0000664 0000000 0000000 00000000215 13617065163 0025435 0 ustar 00root root 0000000 0000000 fails:Integer#round raises a RangeError when passed Float::INFINITY
fails:Integer#round raises a RangeError when passed a big negative value
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/ 0000775 0000000 0000000 00000000000 13617065163 0021723 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/binread_spec.rb 0000664 0000000 0000000 00000001011 13617065163 0024657 0 ustar 00root root 0000000 0000000 fails:IO.binread reads the contents of a file
fails:IO.binread reads the contents of a file up to a certain size when specified
fails:IO.binread reads the contents of a file from an offset of a specific size when specified
fails:IO.binread returns a String in ASCII-8BIT encoding
fails:IO.binread returns a String in ASCII-8BIT encoding regardless of Encoding.default_internal
fails:IO.binread raises an ArgumentError when not passed a valid length
fails:IO.binread raises an Errno::EINVAL when not passed a valid offset
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/chars_spec.rb 0000664 0000000 0000000 00000000045 13617065163 0024361 0 ustar 00root root 0000000 0000000 fails:IO#chars yields each character
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/each_char_spec.rb 0000664 0000000 0000000 00000000051 13617065163 0025153 0 ustar 00root root 0000000 0000000 fails:IO#each_char yields each character
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/lines_spec.rb 0000664 0000000 0000000 00000000045 13617065163 0024373 0 ustar 00root root 0000000 0000000 fails:IO#lines ignores a given block
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/open_spec.rb 0000664 0000000 0000000 00000003300 13617065163 0024217 0 ustar 00root root 0000000 0000000 fails:IO.open uses the external encoding specified in the mode argument
fails:IO.open uses the external and the internal encoding specified in the mode argument
fails:IO.open uses the external encoding specified via the :external_encoding option
fails:IO.open uses the internal encoding specified via the :internal_encoding option
fails:IO.open uses the colon-separated encodings specified via the :encoding option
fails:IO.open ingores the :encoding option when the :external_encoding option is present
fails:IO.open ingores the :encoding option when the :internal_encoding option is present
fails:IO.open uses the encoding specified via the :mode option hash
fails:IO.open ignores the :internal_encoding option when the same as the external encoding
fails:IO.open sets internal encoding to nil when passed '-'
fails:IO.open sets binmode from mode string
fails:IO.open does not set binmode without being asked
fails:IO.open sets binmode from :binmode option
fails:IO.open does not set binmode from false :binmode
fails:IO.open raises an error if passed binary/text mode two ways
fails:IO.open sets external encoding to binary with binmode in mode string
fails:IO.open sets external encoding to binary with :binmode option
fails:IO.open does not use binary encoding when mode encoding is specified
fails:IO.open does not use binary encoding when :encoding option is specified
fails:IO.open does not use binary encoding when :external_encoding option is specified
fails:IO.open does not use binary encoding when :internal_encoding option is specified
fails:IO.open coerces mode with #to_int
fails:IO.open coerces options as second argument with #to_hash
fails:IO.open raises ArgumentError if not passed a hash or nil for options
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/ungetbyte_spec.rb 0000664 0000000 0000000 00000000343 13617065163 0025270 0 ustar 00root root 0000000 0000000 fails:IO#ungetbyte does nothing when passed nil
fails:IO#ungetbyte puts back each byte in a String argument
fails:IO#ungetbyte calls #to_str to convert the argument
fails:IO#ungetbyte puts back one byte for an Integer argument
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/io/write_spec.rb 0000664 0000000 0000000 00000000456 13617065163 0024421 0 ustar 00root root 0000000 0000000 fails:IO.write uses encoding from given options, if provided
fails:IO.write uses an :open_args option
fails:IO.write disregards other options if :open_args is given
fails:IO.write uses the given encoding and returns the number of bytes written
fails:IO.write writes binary data if no encoding is given
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0022574 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/__callee___spec.rb 0000664 0000000 0000000 00000000617 13617065163 0026160 0 ustar 00root root 0000000 0000000 fails:Kernel.__callee__ returns the current method, even when aliased
fails:Kernel.__callee__ returns the original name when aliased method
fails:Kernel.__callee__ returns the caller from blocks too
fails:Kernel.__callee__ returns nil when not called from a method
fails:Kernel.__callee__ returns the caller when sent as a string
fails:Kernel.__callee__ returns the aliased name when aliased method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/__method___spec.rb 0000664 0000000 0000000 00000000106 13617065163 0026204 0 ustar 00root root 0000000 0000000 fails:Kernel.__method__ returns the original name when aliased method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/define_singleton_method_spec.rb 0000664 0000000 0000000 00000000452 13617065163 0031010 0 ustar 00root root 0000000 0000000 fails:Kernel#define_singleton_method when given an UnboundMethod defines any Child class method from any Parent's class methods
fails:Kernel#define_singleton_method when given an UnboundMethod will raise when attempting to define an object's singleton method from another object's singleton method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/public_method_spec.rb 0000664 0000000 0000000 00000000255 13617065163 0026753 0 ustar 00root root 0000000 0000000 fails:Kernel#public_method returns a method object if we repond_to_missing? method
fails:Kernel#public_method changes the method called for super on a target aliased method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/kernel/require_relative_spec.rb 0000664 0000000 0000000 00000000463 13617065163 0027505 0 ustar 00root root 0000000 0000000 fails:Kernel#require_relative with a relative path stores the missing path in a LoadError object
fails:Kernel#require_relative with a relative path when file is a symlink loads a path relative to current file
fails:Kernel#require_relative with an absolute path stores the missing path in a LoadError object
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/math/ 0000775 0000000 0000000 00000000000 13617065163 0022245 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/math/log2_spec.rb 0000664 0000000 0000000 00000000655 13617065163 0024455 0 ustar 00root root 0000000 0000000 fails:Math.log2 raises an Errno::EDOM if the argument is less than 0
fails:Math.log2 raises an TypeError if the argument cannot be coerced with Float()
fails:Math.log2 raises an TypeError if passed a numerical argument as a string
fails:Math.log2 returns NaN given NaN
fails:Math.log2 raises a TypeError if the argument cannot be coerced with Float()
fails:Math.log2 raises a TypeError if passed a numerical argument as a string
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/math/log_spec.rb 0000664 0000000 0000000 00000000276 13617065163 0024372 0 ustar 00root root 0000000 0000000 fails:Math.log raises a TypeError if the argument cannot be coerced with Float()
fails:Math.log raises a TypeError for numerical values passed as string
fails:Math.log returns NaN given NaN
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022601 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026572 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026765 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026440 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025112 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026512 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/class_exec_spec.rb 0000664 0000000 0000000 00000000207 13617065163 0026250 0 ustar 00root root 0000000 0000000 fails:Module#class_exec defines method in the receiver's scope
fails:Module#class_exec raises an LocalJumpError when no block is given
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026732 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/module_exec_spec.rb 0000664 0000000 0000000 00000000211 13617065163 0026423 0 ustar 00root root 0000000 0000000 fails:Module#module_exec defines method in the receiver's scope
fails:Module#module_exec raises an LocalJumpError when no block is given
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026777 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026602 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022076 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024225 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/numeric/ 0000775 0000000 0000000 00000000000 13617065163 0022756 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/numeric/step_spec.rb 0000664 0000000 0000000 00000002231 13617065163 0025266 0 ustar 00root root 0000000 0000000 fails:Numeric#step Numeric#step with [stop, +step] when self, stop or step is a Float is careful about not yielding a value greater than limit
fails:Numeric#step Numeric#step with [stop, -step] when self, stop or step is a Float is careful about not yielding a value smaller than limit
fails:Numeric#step Numeric#step with [stop, +Infinity] yields once if self < stop
fails:Numeric#step Numeric#step with [stop, +Infinity] yields once when stop is Infinity
fails:Numeric#step Numeric#step with [stop, +Infinity] yields once when self equals stop
fails:Numeric#step Numeric#step with [stop, +Infinity] yields once when self and stop are Infinity
fails:Numeric#step Numeric#step with [stop, +Infinity] does not yield when self > stop
fails:Numeric#step Numeric#step with [stop, -infinity] yields once if self > stop
fails:Numeric#step Numeric#step with [stop, -infinity] yields once if stop is -Infinity
fails:Numeric#step Numeric#step with [stop, -infinity] yields once when self equals stop
fails:Numeric#step Numeric#step with [stop, -infinity] yields once when self and stop are Infinity
fails:Numeric#step Numeric#step with [stop, -infinity] does not yield when self > stop
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/proc/ 0000775 0000000 0000000 00000000000 13617065163 0022257 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/proc/curry_spec.rb 0000664 0000000 0000000 00000000443 13617065163 0024763 0 ustar 00root root 0000000 0000000 fails:Proc#curry produces Procs that raise ArgumentError for #binding
fails:Proc#curry produces Procs that return [[:rest]] for #parameters
fails:Proc#curry produces Procs that return nil for #source_location
fails:Proc#curry produces Procs that can be passed as the block for instance_exec
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/range/ 0000775 0000000 0000000 00000000000 13617065163 0022410 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/range/step_spec.rb 0000664 0000000 0000000 00000002523 13617065163 0024724 0 ustar 00root root 0000000 0000000 fails:Range#step with inclusive end and Integer values yields Float values incremented by a Float step
fails:Range#step with inclusive end and Float values returns Float values of 'step * n + begin <= end'
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by 1 and less than or equal to end when not passed a step
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by an Integer step
fails:Range#step with inclusive end and Integer, Float values yields Float values incremented by a Float step
fails:Range#step with inclusive end and String values raises a TypeError when passed a Float step
fails:Range#step with exclusive end and Integer values yields Float values incremented by a Float step
fails:Range#step with exclusive end and Float values returns Float values of 'step * n + begin < end'
fails:Range#step with exclusive end and Integer, Float values yields Float values incremented by 1 and less than end when not passed a step
fails:Range#step with exclusive end and Integer, Float values yields Float values incremented by an Integer step
fails:Range#step with exclusive end and Integer, Float values yields an Float and then Float values incremented by a Float step
fails:Range#step with exclusive end and String values raises a TypeError when passed a Float step
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/ 0000775 0000000 0000000 00000000000 13617065163 0022622 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/getbyte_spec.rb 0000664 0000000 0000000 00000000643 13617065163 0025627 0 ustar 00root root 0000000 0000000 fails:String#getbyte returns an Integer between 0 and 255
fails:String#getbyte regards a multi-byte character as having multiple bytes
fails:String#getbyte mirrors the output of #bytes
fails:String#getbyte interprets bytes relative to the String's encoding
fails:String#getbyte raises an ArgumentError unless given one argument
fails:String#getbyte raises a TypeError unless its argument can be coerced into an Integer
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/partition_spec.rb 0000664 0000000 0000000 00000000103 13617065163 0026164 0 ustar 00root root 0000000 0000000 fails:String#partition with String sets global vars if regexp used
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/prepend_spec.rb 0000664 0000000 0000000 00000000077 13617065163 0025622 0 ustar 00root root 0000000 0000000 fails:String#prepend raises a RuntimeError when self if frozen
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/rpartition_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026356 0 ustar 00root root 0000000 0000000 fails:String#rpartition with String affects $~
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/setbyte_spec.rb 0000664 0000000 0000000 00000000520 13617065163 0025635 0 ustar 00root root 0000000 0000000 fails:String#setbyte allows changing bytes in multi-byte characters
fails:String#setbyte can invalidate a String's encoding
fails:String#setbyte sets a byte at an index greater than String size
fails:String#setbyte raises a RuntimeError if self is frozen
fails:String#setbyte raises a TypeError unless the second argument is an Integer
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/string/upto_spec.rb 0000664 0000000 0000000 00000000126 13617065163 0025147 0 ustar 00root root 0000000 0000000 fails:String#upto raises a LocalJumpError if other is a string but no block was given
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/ 0000775 0000000 0000000 00000000000 13617065163 0022621 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/capitalize_spec.rb 0000664 0000000 0000000 00000000370 13617065163 0026305 0 ustar 00root root 0000000 0000000 fails:Symbol#capitalize leaves the first character alone if it is not an alphabetical ASCII character
fails:Symbol#capitalize leaves uppercase Unicode characters as they were
fails:Symbol#capitalize leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/comparison_spec.rb 0000664 0000000 0000000 00000000127 13617065163 0026332 0 ustar 00root root 0000000 0000000 fails:Symbol#<=> with Symbol compares individual characters based on their ascii value
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/downcase_spec.rb 0000664 0000000 0000000 00000000216 13617065163 0025762 0 ustar 00root root 0000000 0000000 fails:Symbol#downcase leaves lowercase Unicode characters as they were
fails:Symbol#downcase leaves uppercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/element_reference_spec.rb 0000664 0000000 0000000 00000000656 13617065163 0027636 0 ustar 00root root 0000000 0000000 fails:Symbol#[] with a Regex slice without a capture index sets $~ to the MatchData if there is a match
fails:Symbol#[] with a Regex slice with a capture index sets $~ to the MatchData if there is a match
fails:Symbol#[] with a Regex slice without a capture index returns an untrusted string if the regexp is untrusted
fails:Symbol#[] with a Regex slice with a capture index returns an untrusted string if the regexp is untrusted
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/empty_spec.rb 0000664 0000000 0000000 00000000062 13617065163 0025314 0 ustar 00root root 0000000 0000000 fails:Symbol#empty? returns true if self is empty
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/match_spec.rb 0000664 0000000 0000000 00000000155 13617065163 0025255 0 ustar 00root root 0000000 0000000 fails:Symbol#=~ sets the last match pseudo-variables
fails:Symbol#match sets the last match pseudo-variables
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/swapcase_spec.rb 0000664 0000000 0000000 00000000216 13617065163 0025765 0 ustar 00root root 0000000 0000000 fails:Symbol#swapcase leaves uppercase Unicode characters as they were
fails:Symbol#swapcase leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/to_proc_spec.rb 0000664 0000000 0000000 00000000135 13617065163 0025624 0 ustar 00root root 0000000 0000000 fails:Symbol#to_proc raises an ArgumentError when calling #call on the Proc without receiver
backports-3.16.0/frozen_old_spec/tags/1.8.6/core/symbol/upcase_spec.rb 0000664 0000000 0000000 00000000105 13617065163 0025434 0 ustar 00root root 0000000 0000000 fails:Symbol#upcase leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.7/ 0000775 0000000 0000000 00000000000 13617065163 0020365 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/ 0000775 0000000 0000000 00000000000 13617065163 0021315 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/ 0000775 0000000 0000000 00000000000 13617065163 0022433 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/append_spec.rb 0000664 0000000 0000000 00000000067 13617065163 0025244 0 ustar 00root root 0000000 0000000 fails:Array#<< raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/keep_if_spec.rb 0000664 0000000 0000000 00000000233 13617065163 0025372 0 ustar 00root root 0000000 0000000 fails:Array#keep_if on frozen objects with truthy block raises a RuntimeError
fails:Array#keep_if on frozen objects with falsy block raises a RuntimeError
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/rotate_spec.rb 0000664 0000000 0000000 00000000176 13617065163 0025274 0 ustar 00root root 0000000 0000000 fails:Array#rotate returns subclass instance for Array subclasses
fails:Array#rotate! raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/select_spec.rb 0000664 0000000 0000000 00000000233 13617065163 0025247 0 ustar 00root root 0000000 0000000 fails:Array#select! on frozen objects with truthy block raises a RuntimeError
fails:Array#select! on frozen objects with falsy block raises a RuntimeError
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/array/uniq_spec.rb 0000664 0000000 0000000 00000000363 13617065163 0024750 0 ustar 00root root 0000000 0000000 fails:Array#uniq! raises a RuntimeError on a frozen array when the array is modified
fails:Array#uniq! raises a RuntimeError on a frozen array when the array would not be modified
fails:Array#uniq! doesn't yield to the block on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/complex/ 0000775 0000000 0000000 00000000000 13617065163 0022764 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/complex/to_r_spec.rb 0000664 0000000 0000000 00000000526 13617065163 0025271 0 ustar 00root root 0000000 0000000 fails:Complex#to_r when the imaginary part is Fixnum 0 returns the result of sending #to_r to the real part
fails:Complex#to_r when the imaginary part is Rational 0 returns the result of sending #to_r to the real part
fails:Complex#to_r when the imaginary part responds to #== 0 with true returns the result of sending #to_r to the real part
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023434 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/all_spec.rb 0000664 0000000 0000000 00000000134 13617065163 0025541 0 ustar 00root root 0000000 0000000 fails:Enumerable#all? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000246 13617065163 0025564 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
fails:Enumerable#any? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/collect_concat_spec.rb 0000664 0000000 0000000 00000000072 13617065163 0027746 0 ustar 00root root 0000000 0000000 fails:Enumerable#collect_concat calls to_ary but not to_a
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/flat_map_spec.rb 0000664 0000000 0000000 00000000064 13617065163 0026556 0 ustar 00root root 0000000 0000000 fails:Enumerable#flat_map calls to_ary but not to_a
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/none_spec.rb 0000664 0000000 0000000 00000000137 13617065163 0025733 0 ustar 00root root 0000000 0000000 fails:Enumerable#none? with a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/enumerable/one_spec.rb 0000664 0000000 0000000 00000000145 13617065163 0025554 0 ustar 00root root 0000000 0000000 fails:Enumerable#one? when passed a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/env/ 0000775 0000000 0000000 00000000000 13617065163 0022105 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/env/to_h_spec.rb 0000664 0000000 0000000 00000000152 13617065163 0024373 0 ustar 00root root 0000000 0000000 fails:ENV.to_hash uses the locale encoding for keys
fails:ENV.to_hash uses the locale encoding for values
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/ 0000775 0000000 0000000 00000000000 13617065163 0022234 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/lchmod_spec.rb 0000664 0000000 0000000 00000000155 13617065163 0025042 0 ustar 00root root 0000000 0000000 fails:File.lchmod returns false from #respond_to?
fails:File.lchmod raises a NotImplementedError when called
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/new_spec.rb 0000664 0000000 0000000 00000000133 13617065163 0024361 0 ustar 00root root 0000000 0000000 fails:File.new raises an Errno::EBADF if the first parameter is an invalid file descriptor
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/open_spec.rb 0000664 0000000 0000000 00000000523 13617065163 0024534 0 ustar 00root root 0000000 0000000 fails:File.open on a FIFO opens it as a normal file
fails:File.open raises a SystemCallError if passed an invalid Integer type
fails:File.open defaults external_encoding to ASCII-8BIT for binary modes
fails:File.open when passed a file descriptor opens a file
fails:File.open when passed a file descriptor opens a file when passed a block
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/readlink_spec.rb 0000664 0000000 0000000 00000001353 13617065163 0025366 0 ustar 00root root 0000000 0000000 fails:File.readlink File.readlink with absolute paths return the name of the file referenced by the given link
fails:File.readlink File.readlink with absolute paths returns the name of the file referenced by the given link when the file does not exist
fails:File.readlink File.readlink with absolute paths raises an Errno::ENOENT if there is no such file
fails:File.readlink File.readlink with absolute paths raises an Errno::EINVAL if called with a normal file
fails:File.readlink File.readlink when changing the working directory returns the name of the file referenced by the given link
fails:File.readlink File.readlink when changing the working directory returns the name of the file referenced by the given link when the file does not exist
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/file/to_path_spec.rb 0000664 0000000 0000000 00000000066 13617065163 0025233 0 ustar 00root root 0000000 0000000 fails:File#to_path preserves the encoding of the path
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/ 0000775 0000000 0000000 00000000000 13617065163 0022240 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/assoc_spec.rb 0000664 0000000 0000000 00000000124 13617065163 0024704 0 ustar 00root root 0000000 0000000 fails:Hash#assoc only returns the first matching key-value pair for identity hashes
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/default_proc_spec.rb 0000664 0000000 0000000 00000000322 13617065163 0026243 0 ustar 00root root 0000000 0000000 fails:Hash#default_proc= raises an error if passed nil
fails:Hash#default_proc= raises a TypeError if passed a lambda with an arity other than 2
fails:Hash#default_proc= raises a RuntimeError if self is frozen
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/keep_if_spec.rb 0000664 0000000 0000000 00000000221 13617065163 0025174 0 ustar 00root root 0000000 0000000 fails:Hash#keep_if raises an RuntimeError if called on a frozen instance
fails:Hash#keep_if raises a RuntimeError if called on a frozen instance
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/merge_spec.rb 0000664 0000000 0000000 00000000365 13617065163 0024702 0 ustar 00root root 0000000 0000000 fails:Hash#merge! raises a RuntimeError on a frozen instance that is modified
fails:Hash#merge! checks frozen status before coercing an object with #to_hash
fails:Hash#merge! raises a RuntimeError on a frozen instance that would not be modified
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/rassoc_spec.rb 0000664 0000000 0000000 00000000101 13617065163 0025061 0 ustar 00root root 0000000 0000000 fails:Hash#rassoc only returns the first matching key-value pair
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/select_spec.rb 0000664 0000000 0000000 00000000104 13617065163 0025051 0 ustar 00root root 0000000 0000000 fails:Hash#select returns a Hash of entries for which block is true
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/to_h_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0024522 0 ustar 00root root 0000000 0000000 fails:Hash#to_h when called on a subclass of Hash copies the default_proc
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/hash/update_spec.rb 0000664 0000000 0000000 00000000365 13617065163 0025065 0 ustar 00root root 0000000 0000000 fails:Hash#update raises a RuntimeError on a frozen instance that is modified
fails:Hash#update checks frozen status before coercing an object with #to_hash
fails:Hash#update raises a RuntimeError on a frozen instance that would not be modified
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/integer/ 0000775 0000000 0000000 00000000000 13617065163 0022752 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/integer/round_spec.rb 0000664 0000000 0000000 00000000215 13617065163 0025436 0 ustar 00root root 0000000 0000000 fails:Integer#round raises a RangeError when passed Float::INFINITY
fails:Integer#round raises a RangeError when passed a big negative value
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/io/ 0000775 0000000 0000000 00000000000 13617065163 0021724 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/io/binread_spec.rb 0000664 0000000 0000000 00000001011 13617065163 0024660 0 ustar 00root root 0000000 0000000 fails:IO.binread reads the contents of a file
fails:IO.binread reads the contents of a file up to a certain size when specified
fails:IO.binread reads the contents of a file from an offset of a specific size when specified
fails:IO.binread returns a String in ASCII-8BIT encoding
fails:IO.binread returns a String in ASCII-8BIT encoding regardless of Encoding.default_internal
fails:IO.binread raises an ArgumentError when not passed a valid length
fails:IO.binread raises an Errno::EINVAL when not passed a valid offset
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/io/open_spec.rb 0000664 0000000 0000000 00000004276 13617065163 0024235 0 ustar 00root root 0000000 0000000 fails:IO.open uses the external encoding specified in the mode argument
fails:IO.open uses the external and the internal encoding specified in the mode argument
fails:IO.open uses the external encoding specified via the :external_encoding option
fails:IO.open uses the internal encoding specified via the :internal_encoding option
fails:IO.open uses the colon-separated encodings specified via the :encoding option
fails:IO.open ingores the :encoding option when the :external_encoding option is present
fails:IO.open ingores the :encoding option when the :internal_encoding option is present
fails:IO.open uses the encoding specified via the :mode option hash
fails:IO.open ignores the :internal_encoding option when the same as the external encoding
fails:IO.open sets internal encoding to nil when passed '-'
fails:IO.open raises an error if passed encodings two ways
fails:IO.open sets binmode from mode string
fails:IO.open does not set binmode without being asked
fails:IO.open sets binmode from :binmode option
fails:IO.open does not set binmode from false :binmode
fails:IO.open sets external encoding to binary with binmode in mode string
fails:IO.open does not use binary encoding when mode encoding is specified
fails:IO.open does not use binary encoding when :encoding option is specified
fails:IO.open does not use binary encoding when :external_encoding option is specified
fails:IO.open does not use binary encoding when :internal_encoding option is specified
fails:IO.open coerces mode with #to_int
fails:IO.open coerces options as second argument with #to_hash
fails:IO.open raises ArgumentError if not passed a hash or nil for options
fails:IO.open sets external encoding to binary with :binmode option
fails:IO.open raises an error if passed binary/text mode two ways
fails:IO.open uses the :encoding option as the external encoding when only one is given
fails:IO.open uses the :encoding options as the external encoding when it's an Encoding object
fails:IO.open coerces :encoding option with #to_str
fails:IO.open coerces :external_encoding option with #to_str
fails:IO.open coerces :internal_encoding option with #to_str
fails:IO.open accepts an :autoclose option
fails:IO.open accepts any truthy option :autoclose
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/io/ungetbyte_spec.rb 0000664 0000000 0000000 00000000343 13617065163 0025271 0 ustar 00root root 0000000 0000000 fails:IO#ungetbyte does nothing when passed nil
fails:IO#ungetbyte puts back each byte in a String argument
fails:IO#ungetbyte calls #to_str to convert the argument
fails:IO#ungetbyte puts back one byte for an Integer argument
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/io/write_spec.rb 0000664 0000000 0000000 00000000456 13617065163 0024422 0 ustar 00root root 0000000 0000000 fails:IO.write uses encoding from given options, if provided
fails:IO.write uses an :open_args option
fails:IO.write disregards other options if :open_args is given
fails:IO.write uses the given encoding and returns the number of bytes written
fails:IO.write writes binary data if no encoding is given
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0022575 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/kernel/__callee___spec.rb 0000664 0000000 0000000 00000000617 13617065163 0026161 0 ustar 00root root 0000000 0000000 fails:Kernel.__callee__ returns the current method, even when aliased
fails:Kernel.__callee__ returns the original name when aliased method
fails:Kernel.__callee__ returns the caller from blocks too
fails:Kernel.__callee__ returns nil when not called from a method
fails:Kernel.__callee__ returns the caller when sent as a string
fails:Kernel.__callee__ returns the aliased name when aliased method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/kernel/define_singleton_method_spec.rb 0000664 0000000 0000000 00000000452 13617065163 0031011 0 ustar 00root root 0000000 0000000 fails:Kernel#define_singleton_method when given an UnboundMethod defines any Child class method from any Parent's class methods
fails:Kernel#define_singleton_method when given an UnboundMethod will raise when attempting to define an object's singleton method from another object's singleton method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/kernel/public_method_spec.rb 0000664 0000000 0000000 00000000123 13617065163 0026746 0 ustar 00root root 0000000 0000000 fails:Kernel#public_method returns a method object if we repond_to_missing? method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/kernel/require_relative_spec.rb 0000664 0000000 0000000 00000000463 13617065163 0027506 0 ustar 00root root 0000000 0000000 fails:Kernel#require_relative with a relative path stores the missing path in a LoadError object
fails:Kernel#require_relative with a relative path when file is a symlink loads a path relative to current file
fails:Kernel#require_relative with an absolute path stores the missing path in a LoadError object
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/math/ 0000775 0000000 0000000 00000000000 13617065163 0022246 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/math/log2_spec.rb 0000664 0000000 0000000 00000000655 13617065163 0024456 0 ustar 00root root 0000000 0000000 fails:Math.log2 raises an Errno::EDOM if the argument is less than 0
fails:Math.log2 raises an TypeError if the argument cannot be coerced with Float()
fails:Math.log2 raises an TypeError if passed a numerical argument as a string
fails:Math.log2 returns NaN given NaN
fails:Math.log2 raises a TypeError if the argument cannot be coerced with Float()
fails:Math.log2 raises a TypeError if passed a numerical argument as a string
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/math/log_spec.rb 0000664 0000000 0000000 00000000276 13617065163 0024373 0 ustar 00root root 0000000 0000000 fails:Math.log raises a TypeError if the argument cannot be coerced with Float()
fails:Math.log raises a TypeError for numerical values passed as string
fails:Math.log returns NaN given NaN
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022602 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000001100 13617065163 0026562 0 ustar 00root root 0000000 0000000 fails:Module#alias_method raises RuntimeError if frozen
fails:Module#alias_method is a private method
fails:Module#alias_method aliasing special methods keeps initialize private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_copy private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_clone private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_dup private when aliasing
fails:Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026766 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026441 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/attr_spec.rb 0000664 0000000 0000000 00000000165 13617065163 0025115 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
fails:Module#attr creates a getter but no setter for all given attribute names
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026513 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026733 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/include_spec.rb 0000664 0000000 0000000 00000000307 13617065163 0025564 0 ustar 00root root 0000000 0000000 fails:Module#include imports constants to modules and classes
fails:Module#include imports instance methods to modules and classes
fails:Module#include does not import methods to modules and classes
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000345 13617065163 0027000 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
fails:Module#remove_method on frozen instance raises a RuntimeError when passed a name
fails:Module#remove_method on frozen instance raises a RuntimeError when passed a missing name
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000342 13617065163 0026601 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
fails:Module#undef_method on frozen instance raises a RuntimeError when passed a name
fails:Module#undef_method on frozen instance raises a RuntimeError when passed a missing name
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022077 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024226 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/proc/ 0000775 0000000 0000000 00000000000 13617065163 0022260 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/proc/curry_spec.rb 0000664 0000000 0000000 00000000321 13617065163 0024757 0 ustar 00root root 0000000 0000000 fails:Proc#curry produces Procs that raise ArgumentError for #binding
fails:Proc#curry produces Procs that return [[:rest]] for #parameters
fails:Proc#curry produces Procs that return nil for #source_location
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/proc/yield_spec.rb 0000664 0000000 0000000 00000001000 13617065163 0024714 0 ustar 00root root 0000000 0000000 fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc ignores excess arguments when self is a proc
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc substitutes nil for missing arguments when self is a proc
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on excess arguments when self is a lambda
fails:Proc#yield on a Proc created with Kernel#lambda or Kernel#proc raises an ArgumentError on missing arguments when self is a lambda
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/range/ 0000775 0000000 0000000 00000000000 13617065163 0022411 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/range/size_spec.rb 0000664 0000000 0000000 00000000077 13617065163 0024726 0 ustar 00root root 0000000 0000000 fails:Range#size returns nil if first and last are not Numeric
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/string/ 0000775 0000000 0000000 00000000000 13617065163 0022623 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/string/getbyte_spec.rb 0000664 0000000 0000000 00000000561 13617065163 0025627 0 ustar 00root root 0000000 0000000 fails:String#getbyte returns an Integer between 0 and 255
fails:String#getbyte regards a multi-byte character as having multiple bytes
fails:String#getbyte interprets bytes relative to the String's encoding
fails:String#getbyte raises an ArgumentError unless given one argument
fails:String#getbyte raises a TypeError unless its argument can be coerced into an Integer
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/string/prepend_spec.rb 0000664 0000000 0000000 00000000077 13617065163 0025623 0 ustar 00root root 0000000 0000000 fails:String#prepend raises a RuntimeError when self if frozen
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/string/setbyte_spec.rb 0000664 0000000 0000000 00000000520 13617065163 0025636 0 ustar 00root root 0000000 0000000 fails:String#setbyte allows changing bytes in multi-byte characters
fails:String#setbyte can invalidate a String's encoding
fails:String#setbyte sets a byte at an index greater than String size
fails:String#setbyte raises a RuntimeError if self is frozen
fails:String#setbyte raises a TypeError unless the second argument is an Integer
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022641 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/struct/new_spec.rb 0000664 0000000 0000000 00000000307 13617065163 0024771 0 ustar 00root root 0000000 0000000 fails:Struct.new creates a new anonymous class with nil first argument
fails:Struct.new creates a new anonymous class with symbol arguments
fails:Struct.new processes passed block with instance_eval
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/ 0000775 0000000 0000000 00000000000 13617065163 0022622 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/capitalize_spec.rb 0000664 0000000 0000000 00000000370 13617065163 0026306 0 ustar 00root root 0000000 0000000 fails:Symbol#capitalize leaves the first character alone if it is not an alphabetical ASCII character
fails:Symbol#capitalize leaves uppercase Unicode characters as they were
fails:Symbol#capitalize leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/comparison_spec.rb 0000664 0000000 0000000 00000000127 13617065163 0026333 0 ustar 00root root 0000000 0000000 fails:Symbol#<=> with Symbol compares individual characters based on their ascii value
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/downcase_spec.rb 0000664 0000000 0000000 00000000216 13617065163 0025763 0 ustar 00root root 0000000 0000000 fails:Symbol#downcase leaves lowercase Unicode characters as they were
fails:Symbol#downcase leaves uppercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/element_reference_spec.rb 0000664 0000000 0000000 00000000656 13617065163 0027637 0 ustar 00root root 0000000 0000000 fails:Symbol#[] with a Regex slice without a capture index sets $~ to the MatchData if there is a match
fails:Symbol#[] with a Regex slice with a capture index sets $~ to the MatchData if there is a match
fails:Symbol#[] with a Regex slice without a capture index returns an untrusted string if the regexp is untrusted
fails:Symbol#[] with a Regex slice with a capture index returns an untrusted string if the regexp is untrusted
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/empty_spec.rb 0000664 0000000 0000000 00000000062 13617065163 0025315 0 ustar 00root root 0000000 0000000 fails:Symbol#empty? returns true if self is empty
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/match_spec.rb 0000664 0000000 0000000 00000000155 13617065163 0025256 0 ustar 00root root 0000000 0000000 fails:Symbol#=~ sets the last match pseudo-variables
fails:Symbol#match sets the last match pseudo-variables
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/swapcase_spec.rb 0000664 0000000 0000000 00000000216 13617065163 0025766 0 ustar 00root root 0000000 0000000 fails:Symbol#swapcase leaves uppercase Unicode characters as they were
fails:Symbol#swapcase leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.8.7/core/symbol/upcase_spec.rb 0000664 0000000 0000000 00000000105 13617065163 0025435 0 ustar 00root root 0000000 0000000 fails:Symbol#upcase leaves lowercase Unicode characters as they were
backports-3.16.0/frozen_old_spec/tags/1.9.1/ 0000775 0000000 0000000 00000000000 13617065163 0020360 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/ 0000775 0000000 0000000 00000000000 13617065163 0021310 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/array/ 0000775 0000000 0000000 00000000000 13617065163 0022426 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/array/append_spec.rb 0000664 0000000 0000000 00000000067 13617065163 0025237 0 ustar 00root root 0000000 0000000 fails:Array#<< raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/array/rotate_spec.rb 0000664 0000000 0000000 00000000102 13617065163 0025254 0 ustar 00root root 0000000 0000000 fails:Array#rotate returns subclass instance for Array subclasses
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023427 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/enumerable/all_spec.rb 0000664 0000000 0000000 00000000134 13617065163 0025534 0 ustar 00root root 0000000 0000000 fails:Enumerable#all? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000246 13617065163 0025557 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
fails:Enumerable#any? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/enumerable/none_spec.rb 0000664 0000000 0000000 00000000137 13617065163 0025726 0 ustar 00root root 0000000 0000000 fails:Enumerable#none? with a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/enumerable/one_spec.rb 0000664 0000000 0000000 00000000145 13617065163 0025547 0 ustar 00root root 0000000 0000000 fails:Enumerable#one? when passed a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/env/ 0000775 0000000 0000000 00000000000 13617065163 0022100 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/env/to_h_spec.rb 0000664 0000000 0000000 00000000152 13617065163 0024366 0 ustar 00root root 0000000 0000000 fails:ENV.to_hash uses the locale encoding for keys
fails:ENV.to_hash uses the locale encoding for values
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/hash/ 0000775 0000000 0000000 00000000000 13617065163 0022233 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/hash/default_proc_spec.rb 0000664 0000000 0000000 00000000132 13617065163 0026235 0 ustar 00root root 0000000 0000000 fails:Hash#default_proc= raises a TypeError if passed a lambda with an arity other than 2
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/io/ 0000775 0000000 0000000 00000000000 13617065163 0021717 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/io/write_spec.rb 0000664 0000000 0000000 00000000146 13617065163 0024411 0 ustar 00root root 0000000 0000000 fails:IO.write uses encoding from given options, if provided
fails:IO.write uses an :open_args option
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022575 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000517 13617065163 0026570 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
fails:Module#alias_method aliasing special methods keeps initialize_clone private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_dup private when aliasing
fails:Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026761 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026434 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025106 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026506 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000274 13617065163 0026731 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
fails:Module#define_method returns its symbol
fails:Module#define_method method body is an UnboundMethod allows methods defined on a different object
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026773 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026576 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.1/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022072 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.1/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024221 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/1.9.2/ 0000775 0000000 0000000 00000000000 13617065163 0020361 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/ 0000775 0000000 0000000 00000000000 13617065163 0021311 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/array/ 0000775 0000000 0000000 00000000000 13617065163 0022427 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/array/append_spec.rb 0000664 0000000 0000000 00000000067 13617065163 0025240 0 ustar 00root root 0000000 0000000 fails:Array#<< raises a RuntimeError on a frozen array
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023430 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/enumerable/all_spec.rb 0000664 0000000 0000000 00000000134 13617065163 0025535 0 ustar 00root root 0000000 0000000 fails:Enumerable#all? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000246 13617065163 0025560 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
fails:Enumerable#any? with block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/enumerable/none_spec.rb 0000664 0000000 0000000 00000000137 13617065163 0025727 0 ustar 00root root 0000000 0000000 fails:Enumerable#none? with a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/enumerable/one_spec.rb 0000664 0000000 0000000 00000000145 13617065163 0025550 0 ustar 00root root 0000000 0000000 fails:Enumerable#one? when passed a block gathers initial args as elements when each yields multiple
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/io/ 0000775 0000000 0000000 00000000000 13617065163 0021720 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/io/write_spec.rb 0000664 0000000 0000000 00000000265 13617065163 0024414 0 ustar 00root root 0000000 0000000 fails:IO.write uses encoding from given options, if provided
fails:IO.write uses an :open_args option
fails:IO.write uses the given encoding and returns the number of bytes written
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022576 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000517 13617065163 0026571 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
fails:Module#alias_method aliasing special methods keeps initialize_clone private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_dup private when aliasing
fails:Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026762 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026435 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025107 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026507 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000274 13617065163 0026732 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
fails:Module#define_method returns its symbol
fails:Module#define_method method body is an UnboundMethod allows methods defined on a different object
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026774 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026577 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.2/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022073 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.2/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024222 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/1.9.3/ 0000775 0000000 0000000 00000000000 13617065163 0020362 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.3/core/ 0000775 0000000 0000000 00000000000 13617065163 0021312 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.3/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023431 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.3/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025551 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022577 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000517 13617065163 0026572 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
fails:Module#alias_method aliasing special methods keeps initialize_clone private when aliasing
fails:Module#alias_method aliasing special methods keeps initialize_dup private when aliasing
fails:Module#alias_method aliasing special methods keeps respond_to_missing? private when aliasing
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026774 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000055 13617065163 0026432 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025110 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000055 13617065163 0026504 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000274 13617065163 0026733 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
fails:Module#define_method returns its symbol
fails:Module#define_method method body is an UnboundMethod allows methods defined on a different object
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026775 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/1.9.3/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026600 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/ 0000775 0000000 0000000 00000000000 13617065163 0020347 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021277 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023416 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025536 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022564 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026555 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026750 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026423 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025075 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026475 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000124 13617065163 0026712 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
fails:Module#define_method returns its symbol
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026762 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026565 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022061 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024210 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.0.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022623 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.0.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024743 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.1.0/ 0000775 0000000 0000000 00000000000 13617065163 0020350 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021300 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023417 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025537 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022565 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026556 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026751 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026424 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025076 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026476 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000124 13617065163 0026713 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
fails:Module#define_method returns its symbol
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026763 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026566 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022062 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024211 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.1.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022624 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.1.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024744 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.2.0/ 0000775 0000000 0000000 00000000000 13617065163 0020351 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021301 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023420 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025540 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022566 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026557 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026752 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026425 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025077 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026477 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026717 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026764 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026567 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022063 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024212 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.2.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022625 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.2.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024745 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.3.0/ 0000775 0000000 0000000 00000000000 13617065163 0020352 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021302 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023421 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025541 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022567 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026560 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026753 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026426 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025100 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026500 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026720 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026765 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026570 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022064 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024213 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.3.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022626 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024746 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.3.5/ 0000775 0000000 0000000 00000000000 13617065163 0020357 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.5/core/ 0000775 0000000 0000000 00000000000 13617065163 0021307 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.5/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022633 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.3.5/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024753 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.4.0/ 0000775 0000000 0000000 00000000000 13617065163 0020353 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021303 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023422 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025542 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022570 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026561 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026754 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026427 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025101 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026501 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026721 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026766 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026571 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022065 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024214 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.4.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022627 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.4.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024747 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/frozen_old_spec/tags/2.5.0/ 0000775 0000000 0000000 00000000000 13617065163 0020354 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/ 0000775 0000000 0000000 00000000000 13617065163 0021304 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0023423 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/enumerable/any_spec.rb 0000664 0000000 0000000 00000000112 13617065163 0025543 0 ustar 00root root 0000000 0000000 fails:Enumerable#any? raises an ArgumentError when any arguments provided
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/ 0000775 0000000 0000000 00000000000 13617065163 0022571 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/alias_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026562 0 ustar 00root root 0000000 0000000 fails:Module#alias_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/attr_accessor_spec.rb 0000664 0000000 0000000 00000000201 13617065163 0026755 0 ustar 00root root 0000000 0000000 fails:Module#attr_accessor allows creating an attr_accessor on an immediate class
fails:Module#attr_accessor is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/attr_reader_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026430 0 ustar 00root root 0000000 0000000 fails:Module#attr_reader allows for adding an attr_reader to an immediate
fails:Module#attr_reader is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/attr_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0025102 0 ustar 00root root 0000000 0000000 fails:Module#attr is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/attr_writer_spec.rb 0000664 0000000 0000000 00000000167 13617065163 0026502 0 ustar 00root root 0000000 0000000 fails:Module#attr_writer allows for adding an attr_writer to an immediate
fails:Module#attr_writer is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/define_method_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0026722 0 ustar 00root root 0000000 0000000 fails:Module#define_method is private
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/remove_method_spec.rb 0000664 0000000 0000000 00000000057 13617065163 0026767 0 ustar 00root root 0000000 0000000 fails:Module#remove_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/module/undef_method_spec.rb 0000664 0000000 0000000 00000000056 13617065163 0026572 0 ustar 00root root 0000000 0000000 fails:Module#undef_method is a private method
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/nil/ 0000775 0000000 0000000 00000000000 13617065163 0022066 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/nil/dup_spec.rb 0000664 0000000 0000000 00000000046 13617065163 0024215 0 ustar 00root root 0000000 0000000 fails:NilClass#dup raises a TypeError
backports-3.16.0/frozen_old_spec/tags/2.5.0/core/struct/ 0000775 0000000 0000000 00000000000 13617065163 0022630 5 ustar 00root root 0000000 0000000 backports-3.16.0/frozen_old_spec/tags/2.5.0/core/struct/new_spec.rb 0000664 0000000 0000000 00000000110 13617065163 0024750 0 ustar 00root root 0000000 0000000 fails:Struct.new raises a TypeError if object doesn't respond to to_sym
backports-3.16.0/lib/ 0000775 0000000 0000000 00000000000 13617065163 0014347 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports.rb 0000664 0000000 0000000 00000000116 13617065163 0016662 0 ustar 00root root 0000000 0000000 require "backports/version"
require "backports/2.4"
require "backports/rails"
backports-3.16.0/lib/backports/ 0000775 0000000 0000000 00000000000 13617065163 0016337 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7.rb 0000664 0000000 0000000 00000000246 13617065163 0017341 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 1.8.7
require "backports/tools/require_relative_dir"
require "backports/std_lib"
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/ 0000775 0000000 0000000 00000000000 13617065163 0017012 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/argf.rb 0000664 0000000 0000000 00000000117 13617065163 0020255 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/argf/ 0000775 0000000 0000000 00000000000 13617065163 0017731 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/argf/bytes.rb 0000664 0000000 0000000 00000000051 13617065163 0021400 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/argf/each_byte'
backports-3.16.0/lib/backports/1.8.7/argf/chars.rb 0000664 0000000 0000000 00000000051 13617065163 0021352 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/argf/each_char'
backports-3.16.0/lib/backports/1.8.7/argf/each.rb 0000664 0000000 0000000 00000000203 13617065163 0021151 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ARGF, :each, :force => true if RUBY_VERSION < '1.8.7'
backports-3.16.0/lib/backports/1.8.7/argf/each_byte.rb 0000664 0000000 0000000 00000000315 13617065163 0022200 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.8.7'
require 'backports/tools/make_block_optional'
class << ARGF
Backports.make_block_optional ARGF, :each_byte, :force => true
alias_method :bytes, :each_byte
end
end
backports-3.16.0/lib/backports/1.8.7/argf/each_char.rb 0000664 0000000 0000000 00000001465 13617065163 0022161 0 ustar 00root root 0000000 0000000 unless ARGF.respond_to? :each_char
require 'backports/tools/alias_method'
require 'enumerator'
class << ARGF
def each_char
return to_enum(:each_char) unless block_given?
if $KCODE == "UTF-8"
lookup = 7.downto(4)
while c = read(1) do
n = c[0]
leftmost_zero_bit = lookup.find{|i| n[i].zero? }
case leftmost_zero_bit
when 7 # ASCII
yield c
when 6 # UTF 8 complementary characters
next # Encoding error, ignore
else
more = read(6-leftmost_zero_bit)
break unless more
yield c+more
end
end
else
while s = read(1)
yield s
end
end
self
end
Backports.alias_method self, :chars, :each_char
end
end
backports-3.16.0/lib/backports/1.8.7/argf/each_line.rb 0000664 0000000 0000000 00000000210 13617065163 0022156 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ARGF, :each_line, :force => true if RUBY_VERSION < '1.8.7'
backports-3.16.0/lib/backports/1.8.7/argf/getbyte.rb 0000664 0000000 0000000 00000000151 13617065163 0021716 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
class << ARGF
Backports.alias_method self, :getbyte, :getc
end
backports-3.16.0/lib/backports/1.8.7/argf/lines.rb 0000664 0000000 0000000 00000000154 13617065163 0021370 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
class << ARGF
Backports.alias_method self, :lines, :each_line
end
backports-3.16.0/lib/backports/1.8.7/argf/readbyte.rb 0000664 0000000 0000000 00000000156 13617065163 0022057 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
class << ARGF
Backports.alias_method self, :readbyte, :readchar
end
backports-3.16.0/lib/backports/1.8.7/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020454 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/array/ 0000775 0000000 0000000 00000000000 13617065163 0020130 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/array/collect.rb 0000664 0000000 0000000 00000000160 13617065163 0022077 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :collect!, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/combination.rb 0000664 0000000 0000000 00000001720 13617065163 0022757 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :combination
require 'backports/tools/arguments'
require 'enumerator'
class Array
def combination(num)
num = Backports.coerce_to_int(num)
return to_enum(:combination, num) unless block_given?
return self unless (0..size).include? num
# Implementation note: slightly tricky.
# Example: self = 1..7, num = 3
picks = (0...num).to_a # picks start at 0, 1, 2
max_index = ((size-num)...size).to_a # max (index for a given pick) is [4, 5, 6]
pick_max_pairs = picks.zip(max_index).reverse # pick_max_pairs = [[2, 6], [1, 5], [0, 4]]
leave = Proc.new{return self}
loop do
yield values_at(*picks)
move = pick_max_pairs.find(leave){|pick, max| picks[pick] < max}.first
new_index = picks[move] + 1
picks[move...num] = (new_index...(new_index+num-move)).to_a
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/array/cycle.rb 0000664 0000000 0000000 00000000527 13617065163 0021560 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :cycle
require 'backports/tools/arguments'
class Array
def cycle(n = nil)
return to_enum(:cycle, n) unless block_given?
if n.nil?
each{|e| yield e } until false
else
n = Backports.coerce_to_int(n)
n.times{each{|e| yield e }}
end
nil
end
end
end
backports-3.16.0/lib/backports/1.8.7/array/delete_if.rb 0000664 0000000 0000000 00000000161 13617065163 0022373 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :delete_if, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/each.rb 0000664 0000000 0000000 00000000154 13617065163 0021355 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :each, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/each_index.rb 0000664 0000000 0000000 00000000162 13617065163 0022543 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :each_index, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/find_index.rb 0000664 0000000 0000000 00000000046 13617065163 0022564 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/array/index'
backports-3.16.0/lib/backports/1.8.7/array/flatten.rb 0000664 0000000 0000000 00000002623 13617065163 0022115 0 ustar 00root root 0000000 0000000 unless ([[]].flatten(1) rescue false)
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Array
# Recursively flatten any contained Arrays into an one-dimensional result.
# Adapted from rubinius'
def flatten_with_optional_argument(level=-1)
dup.flatten!(level) || self
end
# Flattens self in place as #flatten. If no changes are
# made, returns nil, otherwise self.
# Adapted from rubinius'
def flatten_with_optional_argument!(level=-1)
level = Backports.coerce_to_int(level)
return flatten_without_optional_argument! if level < 0
out = []
ret = recursively_flatten_finite(self, out, level)
replace(out) if ret
ret
end
Backports.alias_method_chain self, :flatten, :optional_argument
Backports.alias_method_chain self, :flatten!, :optional_argument
# Helper to recurse through flattening
# Adapted from rubinius'; recursion guards are not needed because level is finite
def recursively_flatten_finite(array, out, level)
ret = nil
if level <= 0
out.concat(array)
else
array.each do |o|
if ary = Backports.is_array?(o)
recursively_flatten_finite(ary, out, level - 1)
ret = self
else
out << o
end
end
end
ret
end
private :recursively_flatten_finite
end
end
backports-3.16.0/lib/backports/1.8.7/array/index.rb 0000664 0000000 0000000 00000000731 13617065163 0021565 0 ustar 00root root 0000000 0000000 unless ([1].index{true} rescue false)
require 'backports/tools/alias_method_chain'
require 'enumerator'
class Array
def index_with_block(*arg)
return to_enum(:index_with_block) if arg.empty? && !block_given?
return index_without_block(*arg) unless block_given? && arg.empty?
each_with_index{|o,i| return i if yield o}
return nil
end
Backports.alias_method_chain self, :index, :block
alias_method :find_index, :index
end
end
backports-3.16.0/lib/backports/1.8.7/array/map.rb 0000664 0000000 0000000 00000000154 13617065163 0021232 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :map!, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/permutation.rb 0000664 0000000 0000000 00000001467 13617065163 0023034 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :permutation
require 'backports/tools/arguments'
require 'enumerator'
class Array
def permutation(num = Backports::Undefined)
return to_enum(:permutation, num) unless block_given?
num = num.equal?(Backports::Undefined) ?
size :
Backports.coerce_to_int(num)
return self unless (0..size).include? num
final_lambda = lambda do |partial, remain|
yield partial
end
outer_lambda = (1..num).inject(final_lambda) do |proc, _|
lambda do |partial, remain|
remain.each_with_index do |val, i|
new_remain = remain.dup
new_remain.delete_at(i)
proc.call(partial.dup << val, new_remain)
end
end
end
outer_lambda.call([], dup)
end
end
end
backports-3.16.0/lib/backports/1.8.7/array/pop.rb 0000664 0000000 0000000 00000001016 13617065163 0021251 0 ustar 00root root 0000000 0000000 unless ([1].pop(1) rescue false)
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Array
def pop_with_optional_argument(n = Backports::Undefined)
return pop_without_optional_argument if n == Backports::Undefined
n = Backports.coerce_to_int(n)
raise ArgumentError, "negative array size" if n < 0
first = size - n
first = 0 if first < 0
slice!(first..size).to_a
end
Backports.alias_method_chain self, :pop, :optional_argument
end
end
backports-3.16.0/lib/backports/1.8.7/array/product.rb 0000664 0000000 0000000 00000001625 13617065163 0022141 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :product
require 'backports/tools/arguments'
class Array
def product(*arg)
# Implementation notes: We build a block that will generate all the combinations
# by building it up successively using "inject" and starting with one
# responsible to append the values.
#
result = []
arg.map!{|ary| Backports.coerce_to_ary(ary)}
n = arg.inject(size) { |p, a| p * a.size }
return [] if n == 0
raise RangeError, "too big a product" if n > 1<<31
arg.reverse! # to get the results in the same order as in MRI, vary the last argument first
arg.push self
outer_lambda = arg.inject(result.method(:push)) do |proc, values|
lambda do |partial|
values.each do |val|
proc.call(partial.dup << val)
end
end
end
outer_lambda.call([])
result
end
end
end
backports-3.16.0/lib/backports/1.8.7/array/reject.rb 0000664 0000000 0000000 00000000170 13617065163 0021727 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :reject, :reject!, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/reverse_each.rb 0000664 0000000 0000000 00000000164 13617065163 0023111 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :reverse_each, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/rindex.rb 0000664 0000000 0000000 00000000710 13617065163 0021744 0 ustar 00root root 0000000 0000000 unless ([1].rindex{true} rescue false)
class Array
require 'backports/tools/alias_method_chain'
require 'enumerator'
def rindex_with_block(*arg)
return to_enum(:rindex) if !block_given? && arg.empty?
return rindex_without_block(*arg) unless block_given? && arg.empty?
i = 0
reverse_each{|o| i += 1; return size - i if yield o}
return nil
end
Backports.alias_method_chain self, :rindex, :block
end
end
backports-3.16.0/lib/backports/1.8.7/array/select.rb 0000664 0000000 0000000 00000000156 13617065163 0021736 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Array, :select, :test_on => [42]
backports-3.16.0/lib/backports/1.8.7/array/shift.rb 0000664 0000000 0000000 00000000732 13617065163 0021574 0 ustar 00root root 0000000 0000000 unless ([1].shift(1) rescue false)
class Array
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
def shift_with_optional_argument(n = Backports::Undefined)
return shift_without_optional_argument if n == Backports::Undefined
n = Backports.coerce_to_int(n)
raise ArgumentError, "negative array size" if n < 0
slice!(0, n)
end
Backports.alias_method_chain self, :shift, :optional_argument
end
end
backports-3.16.0/lib/backports/1.8.7/array/shuffle.rb 0000664 0000000 0000000 00000000653 13617065163 0022115 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :shuffle
class Array
def shuffle
dup.shuffle!
end
# Standard in Ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Array.html]
def shuffle!
raise TypeError, "can't modify frozen array" if frozen?
size.times do |i|
r = i + Kernel.rand(size - i)
self[i], self[r] = self[r], self[i]
end
self
end
end
end
backports-3.16.0/lib/backports/1.8.7/binding.rb 0000664 0000000 0000000 00000000117 13617065163 0020750 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/binding/ 0000775 0000000 0000000 00000000000 13617065163 0020424 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/binding/eval.rb 0000664 0000000 0000000 00000000204 13617065163 0021674 0 ustar 00root root 0000000 0000000 unless Binding.method_defined? :eval
class Binding
def eval(expr, *arg)
Kernel.eval(expr, self, *arg)
end
end
end
backports-3.16.0/lib/backports/1.8.7/dir.rb 0000664 0000000 0000000 00000000117 13617065163 0020114 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/dir/ 0000775 0000000 0000000 00000000000 13617065163 0017570 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/dir/each.rb 0000664 0000000 0000000 00000000430 13617065163 0021012 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
begin
Backports.make_block_optional Dir, :each, :test_on => Dir.new('.')
rescue # We may not be able to read the current directory, issue #58
Backports.make_block_optional Dir, :each, :force => true if RUBY_VERSION < '1.8.7'
end
backports-3.16.0/lib/backports/1.8.7/dir/foreach.rb 0000664 0000000 0000000 00000000477 13617065163 0021534 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
class << Dir
begin
Backports.make_block_optional self, :foreach, :test_on => Dir, :arg => '.'
rescue # We may not be able to read the current directory, issue #58
Backports.make_block_optional self, :foreach, :force => true if RUBY_VERSION < '1.8.7'
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021455 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021131 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/enumerable/count.rb 0000664 0000000 0000000 00000000574 13617065163 0022614 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :count
require 'backports/tools/arguments'
module Enumerable
def count(item = Backports::Undefined)
seq = 0
if item != Backports::Undefined
each { |o| seq += 1 if item == o }
elsif block_given?
each { |o| seq += 1 if yield(o) }
else
each { seq += 1 }
end
seq
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/cycle.rb 0000664 0000000 0000000 00000001065 13617065163 0022557 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :cycle
require 'backports/tools/arguments'
require 'enumerator'
module Enumerable
def cycle(n = nil)
return to_enum(:cycle, n) unless block_given?
n = n && Backports.coerce_to_int(n)
if n == nil || n >= 1
cache = []
each do |elem|
cache << elem
yield elem
end
if n
(n-1).times { cache.each{|e| yield e } }
else
loop { cache.each{|e| yield e } }
end unless cache.empty?
end
nil
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/detect.rb 0000664 0000000 0000000 00000000163 13617065163 0022726 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :detect, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/drop.rb 0000664 0000000 0000000 00000000467 13617065163 0022431 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :drop
require 'backports/tools/arguments'
module Enumerable
def drop(n)
n = Backports.coerce_to_int(n)
raise ArgumentError, "attempt to drop negative size" if n < 0
ary = to_a
return [] if n > ary.size
ary[n...ary.size]
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/drop_while.rb 0000664 0000000 0000000 00000000644 13617065163 0023616 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :drop_while
require 'enumerator'
module Enumerable
# Standard in Ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Enumerable.html]
def drop_while
return to_enum(:drop_while) unless block_given?
ary = []
dropping = true
each do |obj|
ary << obj unless dropping &&= yield(obj)
end
ary
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/each_cons.rb 0000664 0000000 0000000 00000000303 13617065163 0023374 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
require 'enumerator' unless Enumerable.method_defined? :each_cons
Backports.make_block_optional Enumerable, :each_cons, :test_on => 1..2, :arg => 1
backports-3.16.0/lib/backports/1.8.7/enumerable/each_slice.rb 0000664 0000000 0000000 00000000305 13617065163 0023533 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
require 'enumerator' unless Enumerable.method_defined? :each_slice
Backports.make_block_optional Enumerable, :each_slice, :test_on => 1..2, :arg => 1
backports-3.16.0/lib/backports/1.8.7/enumerable/each_with_index.rb 0000664 0000000 0000000 00000000174 13617065163 0024602 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :each_with_index, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/entries.rb 0000664 0000000 0000000 00000000541 13617065163 0023127 0 ustar 00root root 0000000 0000000 if Enumerable.instance_method(:entries).arity.zero?
require 'backports/tools/alias_method_chain'
module Enumerable
def entries_with_optional_arguments(*args)
return entries_without_optional_arguments if args.empty?
to_enum(:each, *args).entries
end
Backports.alias_method_chain self, :entries, :optional_arguments
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/find.rb 0000664 0000000 0000000 00000000161 13617065163 0022374 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :find, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/find_all.rb 0000664 0000000 0000000 00000000165 13617065163 0023230 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :find_all, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/find_index.rb 0000664 0000000 0000000 00000000763 13617065163 0023573 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :find_index
require 'backports/tools/arguments'
require 'enumerator'
module Enumerable
def find_index(obj = Backports::Undefined)
if obj != Backports::Undefined
each_with_index do |element, i|
return i if element == obj
end
elsif block_given?
each_with_index do |element, i|
return i if yield element
end
else
return to_enum(:find_index)
end
nil
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/first.rb 0000664 0000000 0000000 00000001001 13617065163 0022575 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :first
require 'backports/tools/arguments'
module Enumerable
def first(n = Backports::Undefined)
if n == Backports::Undefined
each{|obj| return obj}
nil
else
n = Backports.coerce_to_int(n)
raise ArgumentError, "attempt to take negative size: #{n}" if n < 0
array = []
each do |elem|
array << elem
break if array.size >= n
end unless n == 0
array
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/group_by.rb 0000664 0000000 0000000 00000000446 13617065163 0023310 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :group_by
require 'enumerator'
module Enumerable
def group_by
return to_enum(:group_by) unless block_given?
result = {}
each do |o|
result.fetch(yield(o)){|key| result[key] = []} << o
end
result
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/inject.rb 0000664 0000000 0000000 00000000764 13617065163 0022741 0 ustar 00root root 0000000 0000000 unless ((1..2).inject(:+) rescue false)
require 'backports/tools/alias_method'
require 'backports/tools/alias_method_chain'
module Enumerable
def inject_with_symbol(*args, &block)
return inject_without_symbol(*args, &block) if block_given? && args.size <= 1
method = args.pop
inject_without_symbol(*args) {|memo, obj| memo.send(method, obj)}
end
Backports.alias_method_chain self, :inject, :symbol
end
Backports.alias_method Enumerable, :reduce, :inject
end
backports-3.16.0/lib/backports/1.8.7/enumerable/max_by.rb 0000664 0000000 0000000 00000000663 13617065163 0022742 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :max_by
require 'backports/tools/extreme_object'
require 'enumerator'
module Enumerable
def max_by
return to_enum(:max_by) unless block_given?
max_object, max_result = nil, Backports::MOST_EXTREME_OBJECT_EVER
each do |object|
result = yield object
max_object, max_result = object, result if max_result < result
end
max_object
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/min_by.rb 0000664 0000000 0000000 00000000663 13617065163 0022740 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :min_by
require 'backports/tools/extreme_object'
require 'enumerator'
module Enumerable
def min_by
return to_enum(:min_by) unless block_given?
min_object, min_result = nil, Backports::MOST_EXTREME_OBJECT_EVER
each do |object|
result = yield object
min_object, min_result = object, result if min_result > result
end
min_object
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/minmax.rb 0000664 0000000 0000000 00000001101 13617065163 0022740 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :minmax
require 'backports/tools/arguments'
module Enumerable
def minmax
return minmax{|a,b| a <=> b} unless block_given?
first_time = true
min, max = nil
each do |object|
if first_time
min = max = object
first_time = false
else
min = object if Backports.coerce_to_comparison(min, object, yield(min, object)) > 0
max = object if Backports.coerce_to_comparison(max, object, yield(max, object)) < 0
end
end
[min, max]
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/minmax_by.rb 0000664 0000000 0000000 00000001311 13617065163 0023435 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :minmax_by
require 'backports/tools/extreme_object'
require 'enumerator'
module Enumerable
# Standard in Ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Enumerable.html]
def minmax_by
return to_enum(:minmax_by) unless block_given?
min_object, min_result = nil, Backports::MOST_EXTREME_OBJECT_EVER
max_object, max_result = nil, Backports::MOST_EXTREME_OBJECT_EVER
each do |object|
result = yield object
min_object, min_result = object, result if min_result > result
max_object, max_result = object, result if max_result < result
end
[min_object, max_object]
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/none.rb 0000664 0000000 0000000 00000000171 13617065163 0022414 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :none?
module Enumerable
def none?(&block)
!any?(&block)
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/one.rb 0000664 0000000 0000000 00000000665 13617065163 0022246 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :one?
module Enumerable
def one?
found_one = false
if block_given?
each do |o|
if yield(o)
return false if found_one
found_one = true
end
end
else
each do |o|
if o
return false if found_one
found_one = true
end
end
end
found_one
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/partition.rb 0000664 0000000 0000000 00000000166 13617065163 0023472 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :partition, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/reduce.rb 0000664 0000000 0000000 00000000054 13617065163 0022724 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/enumerable/inject'
backports-3.16.0/lib/backports/1.8.7/enumerable/reject.rb 0000664 0000000 0000000 00000000163 13617065163 0022732 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :reject, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/reverse_each.rb 0000664 0000000 0000000 00000000500 13617065163 0024104 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :reverse_each
require 'enumerator'
module Enumerable
def reverse_each
return to_enum(:reverse_each) unless block_given?
# There is no other way then to convert to an array first... see 1.9's source.
to_a.reverse_each{|e| yield e}
self
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/select.rb 0000664 0000000 0000000 00000000163 13617065163 0022735 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :select, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/sort_by.rb 0000664 0000000 0000000 00000000164 13617065163 0023140 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :sort_by, :test_on => 1..2
backports-3.16.0/lib/backports/1.8.7/enumerable/take.rb 0000664 0000000 0000000 00000000233 13617065163 0022400 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :take
require 'backports/1.8.7/enumerable/first'
module Enumerable
def take(n)
first(n)
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/take_while.rb 0000664 0000000 0000000 00000000616 13617065163 0023575 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :take_while
require 'enumerator'
module Enumerable
# Standard in Ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Enumerable.html]
def take_while
return to_enum(:take_while) unless block_given?
inject([]) do |array, elem|
return array unless yield elem
array << elem
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerable/to_a.rb 0000664 0000000 0000000 00000000551 13617065163 0022401 0 ustar 00root root 0000000 0000000 if Enumerable.instance_method(:to_a).arity.zero?
require 'backports/tools/alias_method_chain'
require 'enumerator'
module Enumerable
def to_a_with_optional_arguments(*args)
return to_a_without_optional_arguments if args.empty?
to_enum(:each, *args).to_a
end
Backports.alias_method_chain self, :to_a, :optional_arguments
end
end
backports-3.16.0/lib/backports/1.8.7/enumerator.rb 0000664 0000000 0000000 00000000117 13617065163 0021517 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/enumerator/ 0000775 0000000 0000000 00000000000 13617065163 0021173 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/enumerator/each.rb 0000664 0000000 0000000 00000000315 13617065163 0022417 0 ustar 00root root 0000000 0000000 unless Object.const_defined? :Enumerator
require 'backports/tools/make_block_optional'
require 'enumerator'
Backports.make_block_optional Enumerable::Enumerator, :each, :test_on => [42].to_enum
end
backports-3.16.0/lib/backports/1.8.7/enumerator/next.rb 0000664 0000000 0000000 00000000607 13617065163 0022501 0 ustar 00root root 0000000 0000000 unless Object.const_defined? :Enumerator
require 'enumerator'
unless Enumerable::Enumerator.method_defined? :next
class Enumerable::Enumerator
require 'backports/1.8.7/stop_iteration'
def next
require 'generator'
@generator ||= ::Generator.new(self)
raise StopIteration unless @generator.next?
@generator.next
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerator/rewind.rb 0000664 0000000 0000000 00000000466 13617065163 0023016 0 ustar 00root root 0000000 0000000 unless Object.const_defined? :Enumerator
require 'enumerator'
unless Enumerable::Enumerator.method_defined? :rewind
class Enumerable::Enumerator
def rewind
require 'generator'
@generator ||= ::Generator.new(self)
@generator.rewind
self
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/enumerator/with_index.rb 0000664 0000000 0000000 00000000614 13617065163 0023663 0 ustar 00root root 0000000 0000000 unless Object.const_defined? :Enumerator
require 'enumerator'
unless Enumerable::Enumerator.method_defined? :with_index
class Enumerable::Enumerator
def with_index(offset = 0)
return to_enum(:with_index, offset) unless block_given?
each do |*args|
yield args.size == 1 ? args[0] : args, offset
offset += 1
end
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/env.rb 0000664 0000000 0000000 00000000117 13617065163 0020126 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/env/ 0000775 0000000 0000000 00000000000 13617065163 0017602 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/env/delete_if.rb 0000664 0000000 0000000 00000000156 13617065163 0022051 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :delete_if, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/each.rb 0000664 0000000 0000000 00000000151 13617065163 0021024 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :each, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/each_key.rb 0000664 0000000 0000000 00000000155 13617065163 0021700 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :each_key, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/each_pair.rb 0000664 0000000 0000000 00000000156 13617065163 0022044 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :each_pair, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/each_value.rb 0000664 0000000 0000000 00000000157 13617065163 0022226 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :each_value, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/reject.rb 0000664 0000000 0000000 00000000250 13617065163 0021400 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :reject, :test_on => ENV
Backports.make_block_optional ENV, :reject!, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/env/select.rb 0000664 0000000 0000000 00000000153 13617065163 0021405 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional ENV, :select, :test_on => ENV
backports-3.16.0/lib/backports/1.8.7/fixnum.rb 0000664 0000000 0000000 00000000117 13617065163 0020644 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/fixnum/ 0000775 0000000 0000000 00000000000 13617065163 0020320 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/fixnum/div.rb 0000664 0000000 0000000 00000000213 13617065163 0021423 0 ustar 00root root 0000000 0000000 unless Integer.method_defined?(:div) || Fixnum.method_defined?(:div)
class Fixnum
def div(n)
(self / n).to_i
end
end
end
backports-3.16.0/lib/backports/1.8.7/fixnum/fdiv.rb 0000664 0000000 0000000 00000000207 13617065163 0021574 0 ustar 00root root 0000000 0000000 unless Integer.method_defined?(:fdiv) || Fixnum.method_defined?(:fdiv)
class Fixnum
def fdiv(n)
to_f / n
end
end
end
backports-3.16.0/lib/backports/1.8.7/float.rb 0000664 0000000 0000000 00000000117 13617065163 0020443 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/float/ 0000775 0000000 0000000 00000000000 13617065163 0020117 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/float/fdiv.rb 0000664 0000000 0000000 00000000115 13617065163 0021371 0 ustar 00root root 0000000 0000000 unless Float.method_defined? :fdiv
Float.send :alias_method, :fdiv, :/
end
backports-3.16.0/lib/backports/1.8.7/gc.rb 0000664 0000000 0000000 00000000117 13617065163 0017727 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/gc/ 0000775 0000000 0000000 00000000000 13617065163 0017403 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/gc/stress.rb 0000664 0000000 0000000 00000000176 13617065163 0021257 0 ustar 00root root 0000000 0000000 unless GC.respond_to? :stress
def GC.stress
false
end
def GC.stress=(flag)
raise NotImplementedError
end
end
backports-3.16.0/lib/backports/1.8.7/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020261 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017735 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/hash/constructor.rb 0000664 0000000 0000000 00000001275 13617065163 0022654 0 ustar 00root root 0000000 0000000 unless (Hash[[[:test, :test]]] rescue false)
require 'backports/tools/arguments'
class << Hash
alias_method :constructor_without_key_value_pair_form, :[]
def [](*args)
if args.length == 1
arg = args.first
if (h = Backports.try_convert(arg, Hash, :to_hash))
return allocate.replace(h)
end
if (kvps = Backports.is_array?(arg))
h = {}
kvps.each do |elem|
next unless arr = Backports.is_array?(elem)
next unless (1..2).include? arr.size
h[arr.at(0)] = arr.at(1)
end
return h
end
end
constructor_without_key_value_pair_form(*args)
end
end
end
backports-3.16.0/lib/backports/1.8.7/hash/delete_if.rb 0000664 0000000 0000000 00000000200 13617065163 0022172 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :delete_if, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/each.rb 0000664 0000000 0000000 00000000173 13617065163 0021163 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :each, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/each_key.rb 0000664 0000000 0000000 00000000177 13617065163 0022037 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :each_key, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/each_pair.rb 0000664 0000000 0000000 00000000200 13617065163 0022165 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :each_pair, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/each_value.rb 0000664 0000000 0000000 00000000201 13617065163 0022347 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :each_value, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/eql.rb 0000664 0000000 0000000 00000000044 13617065163 0021041 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/hash/hash'
backports-3.16.0/lib/backports/1.8.7/hash/hash.rb 0000664 0000000 0000000 00000000505 13617065163 0021205 0 ustar 00root root 0000000 0000000 class Hash
def hash
h = 0
each do |key, value|
h ^= key.hash ^ value.hash
end
h
end unless {}.hash == {}.hash
def eql?(other)
other.is_a?(Hash) &&
size == other.size &&
all? do |key, value|
value.eql?(other.fetch(key){return false})
end
end unless {}.eql?({})
end
backports-3.16.0/lib/backports/1.8.7/hash/reject.rb 0000664 0000000 0000000 00000000207 13617065163 0021535 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :reject, :reject!, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/hash/select.rb 0000664 0000000 0000000 00000000175 13617065163 0021544 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Hash, :select, :test_on => {:hello => "world!"}
backports-3.16.0/lib/backports/1.8.7/integer.rb 0000664 0000000 0000000 00000000117 13617065163 0020773 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/integer/ 0000775 0000000 0000000 00000000000 13617065163 0020447 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/integer/downto.rb 0000664 0000000 0000000 00000000172 13617065163 0022306 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Integer, :downto, :test_on => 42, :arg => 42
backports-3.16.0/lib/backports/1.8.7/integer/even.rb 0000664 0000000 0000000 00000000152 13617065163 0021727 0 ustar 00root root 0000000 0000000 unless Integer.method_defined? :even?
class Integer
def even?
self[0].zero?
end
end
end
backports-3.16.0/lib/backports/1.8.7/integer/odd.rb 0000664 0000000 0000000 00000000151 13617065163 0021537 0 ustar 00root root 0000000 0000000 unless Integer.method_defined? :odd?
class Integer
def odd?
!self[0].zero?
end
end
end
backports-3.16.0/lib/backports/1.8.7/integer/ord.rb 0000664 0000000 0000000 00000000135 13617065163 0021557 0 ustar 00root root 0000000 0000000 unless Integer.method_defined? :ord
class Integer
def ord
self
end
end
end
backports-3.16.0/lib/backports/1.8.7/integer/pred.rb 0000664 0000000 0000000 00000000143 13617065163 0021724 0 ustar 00root root 0000000 0000000 unless Integer.method_defined? :pred
class Integer
def pred
self - 1
end
end
end
backports-3.16.0/lib/backports/1.8.7/integer/times.rb 0000664 0000000 0000000 00000000155 13617065163 0022116 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Integer, :times, :test_on => 42
backports-3.16.0/lib/backports/1.8.7/integer/upto.rb 0000664 0000000 0000000 00000000170 13617065163 0021761 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Integer, :upto, :test_on => 42, :arg => 42
backports-3.16.0/lib/backports/1.8.7/io.rb 0000664 0000000 0000000 00000000117 13617065163 0017745 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/io/ 0000775 0000000 0000000 00000000000 13617065163 0017421 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/io/bytes.rb 0000664 0000000 0000000 00000000047 13617065163 0021075 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/io/each_byte'
backports-3.16.0/lib/backports/1.8.7/io/chars.rb 0000664 0000000 0000000 00000000047 13617065163 0021047 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/io/each_char'
backports-3.16.0/lib/backports/1.8.7/io/each.rb 0000664 0000000 0000000 00000000201 13617065163 0020637 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional IO, :each, :force => true if RUBY_VERSION < '1.8.7'
backports-3.16.0/lib/backports/1.8.7/io/each_byte.rb 0000664 0000000 0000000 00000000270 13617065163 0021670 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
if RUBY_VERSION < '1.8.7'
Backports.make_block_optional IO, :each_byte, :force => true
IO.send :alias_method, :bytes, :each_byte
end
backports-3.16.0/lib/backports/1.8.7/io/each_char.rb 0000664 0000000 0000000 00000001371 13617065163 0021645 0 ustar 00root root 0000000 0000000 unless IO.method_defined? :each_char
require 'enumerator'
class IO
def each_char
return to_enum(:each_char) unless block_given?
if $KCODE == "UTF-8"
lookup = 7.downto(4)
while c = read(1) do
n = c[0]
leftmost_zero_bit = lookup.find{|i| n[i].zero? }
case leftmost_zero_bit
when 7 # ASCII
yield c
when 6 # UTF 8 complementary characters
next # Encoding error, ignore
else
more = read(6-leftmost_zero_bit)
break unless more
yield c+more
end
end
else
while s = read(1)
yield s
end
end
self
end
alias_method :chars, :each_char
end
end
backports-3.16.0/lib/backports/1.8.7/io/each_line.rb 0000664 0000000 0000000 00000000270 13617065163 0021654 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
if RUBY_VERSION < '1.8.7'
Backports.make_block_optional IO, :each_line, :force => true
IO.send :alias_method, :lines, :each_line
end
backports-3.16.0/lib/backports/1.8.7/io/foreach.rb 0000664 0000000 0000000 00000000244 13617065163 0021355 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.8.7'
require 'backports/tools/make_block_optional'
class << IO
Backports.make_block_optional self, :foreach, :force => true
end
end
backports-3.16.0/lib/backports/1.8.7/io/getbyte.rb 0000664 0000000 0000000 00000000123 13617065163 0021405 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method IO, :getbyte, :getc
backports-3.16.0/lib/backports/1.8.7/io/lines.rb 0000664 0000000 0000000 00000000047 13617065163 0021061 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/io/each_line'
backports-3.16.0/lib/backports/1.8.7/io/readbyte.rb 0000664 0000000 0000000 00000000130 13617065163 0021537 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method IO, :readbyte, :readchar
backports-3.16.0/lib/backports/1.8.7/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020616 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020272 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/kernel/__method__.rb 0000664 0000000 0000000 00000000230 13617065163 0022666 0 ustar 00root root 0000000 0000000 unless (__method__ || true rescue false)
module Kernel
def __method__
m = caller(1).first[/`(.*)'/,1]
m.to_sym if m
end
end
end
backports-3.16.0/lib/backports/1.8.7/kernel/instance_exec.rb 0000664 0000000 0000000 00000000433 13617065163 0023427 0 ustar 00root root 0000000 0000000 unless Object.method_defined?(:instance_exec)
module Kernel
def instance_exec(*arg, &block)
class << self
self
end.send(:define_method, :"temporary method for instance_exec", &block)
send(:"temporary method for instance_exec", *arg)
end
end
end
backports-3.16.0/lib/backports/1.8.7/kernel/tap.rb 0000664 0000000 0000000 00000000155 13617065163 0021404 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :tap
module Kernel
def tap
yield self
self
end
end
end
backports-3.16.0/lib/backports/1.8.7/method.rb 0000664 0000000 0000000 00000000117 13617065163 0020616 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/method/ 0000775 0000000 0000000 00000000000 13617065163 0020272 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/method/name.rb 0000664 0000000 0000000 00000002566 13617065163 0021550 0 ustar 00root root 0000000 0000000 unless Method.method_defined? :name
require 'backports/tools/alias_method_chain'
class Method
attr_accessor :name, :receiver, :owner
def unbind_with_additional_info
unbound = unbind_without_additional_info
unbound.name = name
unbound.owner = owner
unbound
end
Backports.alias_method_chain self, :unbind, :additional_info
end
class UnboundMethod
attr_accessor :name, :owner
def bind_with_additional_info(to)
bound = bind_without_additional_info(to)
bound.name = name
bound.owner = owner
bound.receiver = to
bound
end
Backports.alias_method_chain self, :bind, :additional_info
end
module Kernel
def method_with_additional_info(name)
bound = method_without_additional_info(name)
bound.name = name.to_s
bound.receiver = self
bound.owner = self.class.ancestors.find{|mod| mod.instance_methods(false).include? bound.name}
bound
end
Backports.alias_method_chain self, :method, :additional_info
end
class Module
def instance_method_with_additional_info(name)
unbound = instance_method_without_additional_info(name)
unbound.name = name.to_s
unbound.owner = ancestors.find{|mod| mod.instance_methods(false).include? unbound.name}
unbound
end
Backports.alias_method_chain self, :instance_method, :additional_info
end
end
backports-3.16.0/lib/backports/1.8.7/module.rb 0000664 0000000 0000000 00000000117 13617065163 0020623 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/module/ 0000775 0000000 0000000 00000000000 13617065163 0020277 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/module/class_exec.rb 0000664 0000000 0000000 00000000055 13617065163 0022735 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/module/module_exec'
backports-3.16.0/lib/backports/1.8.7/module/module_exec.rb 0000664 0000000 0000000 00000000446 13617065163 0023121 0 ustar 00root root 0000000 0000000 unless Module.method_defined? :module_exec
require 'backports/tools/alias_method'
require 'backports/1.8.7/kernel/instance_exec'
class Module
def module_exec(*arg, &block)
instance_exec(*arg, &block)
end
end
Backports.alias_method Module, :class_exec, :module_exec
end
backports-3.16.0/lib/backports/1.8.7/numeric.rb 0000664 0000000 0000000 00000000117 13617065163 0021000 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/numeric/ 0000775 0000000 0000000 00000000000 13617065163 0020454 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/numeric/step.rb 0000664 0000000 0000000 00000000176 13617065163 0021760 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Numeric, :step, :test_on => 42, :arg => [100, 6]
backports-3.16.0/lib/backports/1.8.7/object_space.rb 0000664 0000000 0000000 00000000117 13617065163 0021757 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/object_space/ 0000775 0000000 0000000 00000000000 13617065163 0021433 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/object_space/each_object.rb 0000664 0000000 0000000 00000000224 13617065163 0024204 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
class << ObjectSpace
Backports.make_block_optional self, :each_object, :test_on => ObjectSpace
end
backports-3.16.0/lib/backports/1.8.7/process.rb 0000664 0000000 0000000 00000000117 13617065163 0021014 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/process/ 0000775 0000000 0000000 00000000000 13617065163 0020470 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/process/exec.rb 0000664 0000000 0000000 00000000044 13617065163 0021737 0 ustar 00root root 0000000 0000000 class << Process
public :exec
end
backports-3.16.0/lib/backports/1.8.7/range.rb 0000664 0000000 0000000 00000000117 13617065163 0020432 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/range/ 0000775 0000000 0000000 00000000000 13617065163 0020106 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/range/each.rb 0000664 0000000 0000000 00000000157 13617065163 0021336 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Range, :each, :test_on => 69..666
backports-3.16.0/lib/backports/1.8.7/range/step.rb 0000664 0000000 0000000 00000000173 13617065163 0021407 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Range, :step, :test_on => 69..666, :arg => 42
backports-3.16.0/lib/backports/1.8.7/regexp.rb 0000664 0000000 0000000 00000000117 13617065163 0020630 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/regexp/ 0000775 0000000 0000000 00000000000 13617065163 0020304 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/regexp/union.rb 0000664 0000000 0000000 00000000533 13617065163 0021762 0 ustar 00root root 0000000 0000000 unless (Regexp.union(%w(a b)) rescue false)
require 'backports/tools/alias_method_chain'
class << Regexp
def union_with_array_argument(*arg)
return union_without_array_argument(*arg) unless arg.size == 1
union_without_array_argument(*arg.first)
end
Backports.alias_method_chain self, :union, :array_argument
end
end
backports-3.16.0/lib/backports/1.8.7/stdlib.rb 0000664 0000000 0000000 00000000042 13617065163 0020614 0 ustar 00root root 0000000 0000000 Backports::StdLib.extend_relative
backports-3.16.0/lib/backports/1.8.7/stdlib/ 0000775 0000000 0000000 00000000000 13617065163 0020273 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/stdlib/tmpdir.rb 0000664 0000000 0000000 00000002072 13617065163 0022120 0 ustar 00root root 0000000 0000000 unless Dir.respond_to? :mktmpdir
class << Dir
def mktmpdir(prefix_suffix=nil, tmpdir=nil)
raise NoMethodError, "undefined method `mktmpdir' for Dir:Class; you must require 'tmpdir'" unless respond_to? :tmpdir
case prefix_suffix
when nil
prefix = "d"
suffix = ""
when String
prefix = prefix_suffix
suffix = ""
when Array
prefix = prefix_suffix[0]
suffix = prefix_suffix[1]
else
raise ArgumentError, "unexpected prefix_suffix: #{prefix_suffix.inspect}"
end
tmpdir ||= Dir.tmpdir
t = Time.now.strftime("%Y%m%d")
n = nil
begin
path = "#{tmpdir}/#{prefix}#{t}-#{$$}-#{Kernel.rand(0x100000000).to_s(36)}"
path << "-#{n}" if n
path << suffix
Dir.mkdir(path, 0700)
rescue Errno::EEXIST
n ||= 0
n += 1
retry
end
if block_given?
begin
yield path
ensure
FileUtils.remove_entry_secure path
end
else
path
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/stop_iteration.rb 0000664 0000000 0000000 00000000551 13617065163 0022403 0 ustar 00root root 0000000 0000000 unless Object.const_defined? :StopIteration
require 'backports/tools/alias_method_chain'
class StopIteration < IndexError; end
module Kernel
def loop_with_stop_iteration(&block)
loop_without_stop_iteration(&block)
rescue StopIteration
# ignore silently
end
Backports.alias_method_chain self, :loop, :stop_iteration
end
end
backports-3.16.0/lib/backports/1.8.7/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020644 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/string/ 0000775 0000000 0000000 00000000000 13617065163 0020320 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/string/bytes.rb 0000664 0000000 0000000 00000000053 13617065163 0021771 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/string/each_byte'
backports-3.16.0/lib/backports/1.8.7/string/bytesize.rb 0000664 0000000 0000000 00000000132 13617065163 0022477 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method String, :bytesize, :length
backports-3.16.0/lib/backports/1.8.7/string/each.rb 0000664 0000000 0000000 00000000235 13617065163 0021545 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional String, :each, :test_on => "abc" if "is there still an each?".respond_to? :each
backports-3.16.0/lib/backports/1.8.7/string/each_byte.rb 0000664 0000000 0000000 00000000246 13617065163 0022572 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional String, :each_byte, :test_on => "abc"
Backports.alias_method String, :bytes, :each_byte
backports-3.16.0/lib/backports/1.8.7/string/each_char.rb 0000664 0000000 0000000 00000000446 13617065163 0022546 0 ustar 00root root 0000000 0000000 unless String.method_defined? :each_char
require 'backports/tools/alias_method'
require 'enumerator'
class String
def each_char
return to_enum(:each_char) unless block_given?
scan(/./m) {|c| yield c}
end
Backports.alias_method self, :chars, :each_char
end
end
backports-3.16.0/lib/backports/1.8.7/string/each_line.rb 0000664 0000000 0000000 00000000246 13617065163 0022556 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional String, :each_line, :test_on => "abc"
Backports.alias_method String, :lines, :each_line
backports-3.16.0/lib/backports/1.8.7/string/end_with.rb 0000664 0000000 0000000 00000000434 13617065163 0022447 0 ustar 00root root 0000000 0000000 unless String.method_defined? :end_with?
class String
def end_with?(*suffixes)
suffixes.any? do |suffix|
if suffix.respond_to? :to_str
suffix = suffix.to_str
self[-suffix.length, suffix.length] == suffix
end
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/string/lines.rb 0000664 0000000 0000000 00000000053 13617065163 0021755 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/string/each_line'
backports-3.16.0/lib/backports/1.8.7/string/partition.rb 0000664 0000000 0000000 00000001412 13617065163 0022654 0 ustar 00root root 0000000 0000000 unless ("check partition".partition(" ") rescue false)
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class String
def partition_with_new_meaning(pattern = Backports::Undefined)
return partition_without_new_meaning{|c| yield c} if pattern == Backports::Undefined
pattern = Backports.coerce_to(pattern, String, :to_str) unless pattern.is_a? Regexp
i = index(pattern)
return [self, "", ""] unless i
if pattern.is_a? Regexp
match = Regexp.last_match
[match.pre_match, match[0], match.post_match]
else
last = i+pattern.length
[self[0...i], self[i...last], self[last...length]]
end
end
Backports.alias_method_chain self, :partition, :new_meaning
end
end
backports-3.16.0/lib/backports/1.8.7/string/rpartition.rb 0000664 0000000 0000000 00000001016 13617065163 0023036 0 ustar 00root root 0000000 0000000 unless String.method_defined? :rpartition
require 'backports/tools/arguments'
class String
def rpartition(pattern)
pattern = Backports.coerce_to(pattern, String, :to_str) unless pattern.is_a? Regexp
i = rindex(pattern)
return ["", "", self] unless i
if pattern.is_a? Regexp
match = Regexp.last_match
[match.pre_match, match[0], match.post_match]
else
last = i+pattern.length
[self[0...i], self[i...last], self[last...length]]
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/string/start_with.rb 0000664 0000000 0000000 00000000423 13617065163 0023034 0 ustar 00root root 0000000 0000000 unless String.method_defined? :start_with?
class String
def start_with?(*prefixes)
prefixes.any? do |prefix|
if prefix.respond_to? :to_str
prefix = prefix.to_str
self[0, prefix.length] == prefix
end
end
end
end
end
backports-3.16.0/lib/backports/1.8.7/string/upto.rb 0000664 0000000 0000000 00000000677 13617065163 0021646 0 ustar 00root root 0000000 0000000 unless ("abc".upto("def", true){} rescue false)
require 'backports/tools/alias_method_chain'
require 'enumerator'
class String
def upto_with_exclusive(to, excl=false)
return upto_without_exclusive(to){|s| yield s} if block_given? && !excl
r = Range.new(self, to, excl)
return r.to_enum unless block_given?
r.each{|s| yield s}
self
end
Backports.alias_method_chain self, :upto, :exclusive
end
end
backports-3.16.0/lib/backports/1.8.7/struct.rb 0000664 0000000 0000000 00000000117 13617065163 0020662 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/struct/ 0000775 0000000 0000000 00000000000 13617065163 0020336 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/struct/each.rb 0000664 0000000 0000000 00000000203 13617065163 0021556 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Struct, :each, :test_on => Struct.new(:foo, :bar).new
backports-3.16.0/lib/backports/1.8.7/struct/each_pair.rb 0000664 0000000 0000000 00000000210 13617065163 0022567 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Struct, :each_pair, :test_on => Struct.new(:foo, :bar).new
backports-3.16.0/lib/backports/1.8.7/symbol.rb 0000664 0000000 0000000 00000000117 13617065163 0020643 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.8.7/symbol/ 0000775 0000000 0000000 00000000000 13617065163 0020317 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.8.7/symbol/to_proc.rb 0000664 0000000 0000000 00000000400 13617065163 0022303 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :to_proc
class Symbol
# Standard in ruby 1.8.7+. See official documentation[http://ruby-doc.org/core-1.9/classes/Symbol.html]
def to_proc
Proc.new { |*args| args.shift.__send__(self, *args) }
end
end
end
backports-3.16.0/lib/backports/1.8.8.rb 0000664 0000000 0000000 00000000272 13617065163 0017341 0 ustar 00root root 0000000 0000000 # Ruby 1.8.8 has been officially cancelled. As of version 2.2 of backports, require "backports/1.8.8"
# does nothing more than require 1.8.7 backports
require 'backports/1.8.7'
backports-3.16.0/lib/backports/1.8.rb 0000664 0000000 0000000 00000000137 13617065163 0017173 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of the Ruby 1.8.x line
require 'backports/1.8.7'
backports-3.16.0/lib/backports/1.9.1.rb 0000664 0000000 0000000 00000000231 13617065163 0017326 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 1.9.1 (including all of 1.8.8 and below)
require 'backports/1.8'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/ 0000775 0000000 0000000 00000000000 13617065163 0017005 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020447 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/array/ 0000775 0000000 0000000 00000000000 13617065163 0020123 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/array/sample.rb 0000664 0000000 0000000 00000002063 13617065163 0021732 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :sample
require 'backports/tools/arguments'
class Array
def sample(n = Backports::Undefined, options = Backports::Undefined)
if options == Backports::Undefined && n.respond_to?(:to_hash)
n, options = options, n
end
rng = Backports.coerce_to_option(options, :random) unless options == Backports::Undefined
generator = if rng.respond_to? :rand
Proc.new do |nb|
r = Backports::coerce_to_int(rng.rand(nb))
raise RangeError, "random generator returned #{r} which is not in 0...#{nb}" if r < 0 || r >= nb
r
end
else
Kernel.method(:rand)
end
return self[generator.call(size)] if n == Backports::Undefined
n = Backports.coerce_to_int(n)
raise ArgumentError, "negative array size" if n < 0
n = size if n > size
result = Array.new(self)
n.times do |i|
r = i + generator.call(size - i)
result[i], result[r] = result[r], result[i]
end
result[n..size] = []
result
end
end
end
backports-3.16.0/lib/backports/1.9.1/array/try_convert.rb 0000664 0000000 0000000 00000000243 13617065163 0023025 0 ustar 00root root 0000000 0000000 unless Array.respond_to? :try_convert
require 'backports/tools/arguments'
def Array.try_convert(obj)
Backports.try_convert(obj, Array, :to_ary)
end
end
backports-3.16.0/lib/backports/1.9.1/dir.rb 0000664 0000000 0000000 00000000117 13617065163 0020107 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/dir/ 0000775 0000000 0000000 00000000000 13617065163 0017563 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/dir/to_path.rb 0000664 0000000 0000000 00000000124 13617065163 0021543 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method Dir, :to_path, :path
backports-3.16.0/lib/backports/1.9.1/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021450 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021124 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/enumerable/each_with_index.rb 0000664 0000000 0000000 00000000704 13617065163 0024574 0 ustar 00root root 0000000 0000000 if Enumerable.instance_method(:each_with_index).arity.zero?
require 'backports/tools/alias_method_chain'
require 'enumerator'
module Enumerable
def each_with_index_with_optional_args_and_block(*args)
return to_enum(:each_with_index, *args) unless block_given?
idx = 0
each(*args) { |o| yield(o, idx); idx += 1 }
self
end
Backports.alias_method_chain self, :each_with_index, :optional_args_and_block
end
end
backports-3.16.0/lib/backports/1.9.1/enumerable/each_with_object.rb 0000664 0000000 0000000 00000000351 13617065163 0024731 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :each_with_object
module Enumerable
def each_with_object(memo)
return to_enum(:each_with_object, memo) unless block_given?
each {|obj| yield obj, memo}
memo
end
end
end
backports-3.16.0/lib/backports/1.9.1/enumerator.rb 0000664 0000000 0000000 00000000117 13617065163 0021512 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/enumerator/ 0000775 0000000 0000000 00000000000 13617065163 0021166 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/enumerator/new.rb 0000664 0000000 0000000 00000002160 13617065163 0022303 0 ustar 00root root 0000000 0000000 Enumerator = Enumerable::Enumerator unless Object.const_defined? :Enumerator # Standard in ruby 1.9
unless (Enumerator.new{} rescue false)
require 'backports/tools/alias_method_chain'
# new with block, standard in Ruby 1.9
class Enumerator
# A simple class which allows the construction of Enumerator from a block
class Yielder
def initialize(&block)
@final_block = block
end
def yield(*arg)
@final_block.call(*arg)
end
def <<(*arg)
@final_block.call(*arg)
self
end
end
class GeneratorBP # Avoid conflict with 1.8's ::Generator class
def initialize(&block)
@main_block = block
end
def each(&block)
@main_block.call(Yielder.new(&block))
end
end
def initialize_with_optional_block(*arg, &block)
return initialize_without_optional_block(*arg, &nil) unless arg.empty? # Ruby 1.9 apparently ignores the block if any argument is present
initialize_without_optional_block(GeneratorBP.new(&block))
end
Backports.alias_method_chain self, :initialize, :optional_block
end
end
backports-3.16.0/lib/backports/1.9.1/enumerator/with_object.rb 0000664 0000000 0000000 00000000406 13617065163 0024014 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
require 'backports/1.9.1/enumerable/each_with_object'
Enumerator = Enumerable::Enumerator unless Object.const_defined? :Enumerator # Standard in ruby 1.9
Backports.alias_method Enumerator, :with_object, :each_with_object
backports-3.16.0/lib/backports/1.9.1/env.rb 0000664 0000000 0000000 00000000117 13617065163 0020121 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/env/ 0000775 0000000 0000000 00000000000 13617065163 0017575 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/env/key.rb 0000664 0000000 0000000 00000000145 13617065163 0020712 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
class << ENV
Backports.alias_method self, :key, :index
end
backports-3.16.0/lib/backports/1.9.1/file.rb 0000664 0000000 0000000 00000000117 13617065163 0020250 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/file/ 0000775 0000000 0000000 00000000000 13617065163 0017724 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/file/atime.rb 0000664 0000000 0000000 00000000166 13617065163 0021353 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :atime
end
backports-3.16.0/lib/backports/1.9.1/file/basename.rb 0000664 0000000 0000000 00000000171 13617065163 0022023 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :basename
end
backports-3.16.0/lib/backports/1.9.1/file/binary.rb 0000664 0000000 0000000 00000000207 13617065163 0021534 0 ustar 00root root 0000000 0000000 class File
module Constants
# In Ruby 1.8, it is defined only on Windows
BINARY = 0 unless const_defined?(:BINARY)
end
end
backports-3.16.0/lib/backports/1.9.1/file/blockdev.rb 0000664 0000000 0000000 00000000172 13617065163 0022042 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :blockdev?
end
backports-3.16.0/lib/backports/1.9.1/file/chardev.rb 0000664 0000000 0000000 00000000171 13617065163 0021664 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :chardev?
end
backports-3.16.0/lib/backports/1.9.1/file/chmod.rb 0000664 0000000 0000000 00000000170 13617065163 0021341 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :chmod, 1
end
backports-3.16.0/lib/backports/1.9.1/file/chown.rb 0000664 0000000 0000000 00000000170 13617065163 0021365 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :chown, 2
end
backports-3.16.0/lib/backports/1.9.1/file/ctime.rb 0000664 0000000 0000000 00000000166 13617065163 0021355 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :ctime
end
backports-3.16.0/lib/backports/1.9.1/file/delete.rb 0000664 0000000 0000000 00000000171 13617065163 0021512 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :delete, 0
end
backports-3.16.0/lib/backports/1.9.1/file/directory.rb 0000664 0000000 0000000 00000000173 13617065163 0022256 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :directory?
end
backports-3.16.0/lib/backports/1.9.1/file/dirname.rb 0000664 0000000 0000000 00000000170 13617065163 0021666 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :dirname
end
backports-3.16.0/lib/backports/1.9.1/file/executable.rb 0000664 0000000 0000000 00000000174 13617065163 0022374 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :executable?
end
backports-3.16.0/lib/backports/1.9.1/file/executable_real.rb 0000664 0000000 0000000 00000000201 13617065163 0023366 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :executable_real?
end
backports-3.16.0/lib/backports/1.9.1/file/exist.rb 0000664 0000000 0000000 00000000167 13617065163 0021411 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :exist?
end
backports-3.16.0/lib/backports/1.9.1/file/exists.rb 0000664 0000000 0000000 00000000170 13617065163 0021566 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :exists?
end
backports-3.16.0/lib/backports/1.9.1/file/expand_path.rb 0000664 0000000 0000000 00000000700 13617065163 0022541 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
class << File
def expand_path_with_potential_to_path(file, dir = nil)
raise ArgumentError, 'home not set' if file == '~' && ENV["HOME"] == ''
expand_path_without_potential_to_path(
Backports.convert_path(file),
dir == nil ? dir : Backports.convert_path(dir)
)
end
Backports.alias_method_chain self, :expand_path, :potential_to_path
end
end
backports-3.16.0/lib/backports/1.9.1/file/extname.rb 0000664 0000000 0000000 00000000170 13617065163 0021710 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :extname
end
backports-3.16.0/lib/backports/1.9.1/file/file.rb 0000664 0000000 0000000 00000000166 13617065163 0021173 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :file?
end
backports-3.16.0/lib/backports/1.9.1/file/ftype.rb 0000664 0000000 0000000 00000000166 13617065163 0021403 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :ftype
end
backports-3.16.0/lib/backports/1.9.1/file/grpowned.rb 0000664 0000000 0000000 00000000172 13617065163 0022076 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :grpowned?
end
backports-3.16.0/lib/backports/1.9.1/file/join.rb 0000664 0000000 0000000 00000000167 13617065163 0021214 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :join, 0
end
backports-3.16.0/lib/backports/1.9.1/file/lchmod.rb 0000664 0000000 0000000 00000000226 13617065163 0021517 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9' && File.respond_to?(:lchmod)
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :lchmod, 1
end
backports-3.16.0/lib/backports/1.9.1/file/lchown.rb 0000664 0000000 0000000 00000000171 13617065163 0021542 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :lchown, 2
end
backports-3.16.0/lib/backports/1.9.1/file/link.rb 0000664 0000000 0000000 00000000165 13617065163 0021210 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :link
end
backports-3.16.0/lib/backports/1.9.1/file/lstat.rb 0000664 0000000 0000000 00000000166 13617065163 0021403 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :lstat
end
backports-3.16.0/lib/backports/1.9.1/file/mtime.rb 0000664 0000000 0000000 00000000166 13617065163 0021367 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :mtime
end
backports-3.16.0/lib/backports/1.9.1/file/new.rb 0000664 0000000 0000000 00000000164 13617065163 0021043 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :new
end
backports-3.16.0/lib/backports/1.9.1/file/open.rb 0000664 0000000 0000000 00000001326 13617065163 0021214 0 ustar 00root root 0000000 0000000 begin
File.open(__FILE__, :mode => 'r'){}
rescue TypeError
require 'backports/tools/alias_method_chain'
require 'backports/tools/io'
def open_with_options_hash(file, mode = nil, perm_or_options = Backports::Undefined)
mode, perm = Backports.combine_mode_perm_and_option(mode, perm_or_options)
perm ||= 0666 # Avoid error on Rubinius, see issue #52
if block_given?
open_without_options_hash(file, mode, perm){|f| yield f}
else
open_without_options_hash(file, mode, perm)
end
end
class << File
Backports.alias_method_chain self, :open, :options_hash
end
end
if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :open
end
backports-3.16.0/lib/backports/1.9.1/file/owned.rb 0000664 0000000 0000000 00000000167 13617065163 0021371 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :owned?
end
backports-3.16.0/lib/backports/1.9.1/file/pipe.rb 0000664 0000000 0000000 00000000166 13617065163 0021211 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :pipe?
end
backports-3.16.0/lib/backports/1.9.1/file/readable.rb 0000664 0000000 0000000 00000000172 13617065163 0022010 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :readable?
end
backports-3.16.0/lib/backports/1.9.1/file/readable_real.rb 0000664 0000000 0000000 00000000177 13617065163 0023020 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :readable_real?
end
backports-3.16.0/lib/backports/1.9.1/file/readlink.rb 0000664 0000000 0000000 00000000171 13617065163 0022041 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :readlink
end
backports-3.16.0/lib/backports/1.9.1/file/rename.rb 0000664 0000000 0000000 00000000167 13617065163 0021524 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :rename
end
backports-3.16.0/lib/backports/1.9.1/file/setgid.rb 0000664 0000000 0000000 00000000170 13617065163 0021526 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :setgid?
end
backports-3.16.0/lib/backports/1.9.1/file/setuid.rb 0000664 0000000 0000000 00000000170 13617065163 0021544 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :setuid?
end
backports-3.16.0/lib/backports/1.9.1/file/size.rb 0000664 0000000 0000000 00000000414 13617065163 0021222 0 ustar 00root root 0000000 0000000 unless File.method_defined? :size
class File
def size
stat.size
end
end
end
if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :size?
Backports.convert_first_argument_to_path File, :size
end
backports-3.16.0/lib/backports/1.9.1/file/socket.rb 0000664 0000000 0000000 00000000170 13617065163 0021537 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :socket?
end
backports-3.16.0/lib/backports/1.9.1/file/split.rb 0000664 0000000 0000000 00000000166 13617065163 0021407 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :split
end
backports-3.16.0/lib/backports/1.9.1/file/stat.rb 0000664 0000000 0000000 00000000165 13617065163 0021226 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :stat
end
backports-3.16.0/lib/backports/1.9.1/file/sticky.rb 0000664 0000000 0000000 00000000170 13617065163 0021555 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :sticky?
end
backports-3.16.0/lib/backports/1.9.1/file/symlink.rb 0000664 0000000 0000000 00000000265 13617065163 0021742 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :symlink, 0
Backports.convert_first_argument_to_path File, :symlink?
end
backports-3.16.0/lib/backports/1.9.1/file/to_path.rb 0000664 0000000 0000000 00000000125 13617065163 0021705 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method File, :to_path, :path
backports-3.16.0/lib/backports/1.9.1/file/truncate.rb 0000664 0000000 0000000 00000000171 13617065163 0022075 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :truncate
end
backports-3.16.0/lib/backports/1.9.1/file/unlink.rb 0000664 0000000 0000000 00000000171 13617065163 0021550 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_all_arguments_to_path File, :unlink, 0
end
backports-3.16.0/lib/backports/1.9.1/file/writable.rb 0000664 0000000 0000000 00000000172 13617065163 0022062 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :writable?
end
backports-3.16.0/lib/backports/1.9.1/file/writable_real.rb 0000664 0000000 0000000 00000000177 13617065163 0023072 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :writable_real?
end
backports-3.16.0/lib/backports/1.9.1/file/zero.rb 0000664 0000000 0000000 00000000166 13617065163 0021233 0 ustar 00root root 0000000 0000000 if RUBY_VERSION < '1.9'
require 'backports/tools/path'
Backports.convert_first_argument_to_path File, :zero?
end
backports-3.16.0/lib/backports/1.9.1/float.rb 0000664 0000000 0000000 00000000117 13617065163 0020436 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/float/ 0000775 0000000 0000000 00000000000 13617065163 0020112 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/float/round.rb 0000664 0000000 0000000 00000001126 13617065163 0021566 0 ustar 00root root 0000000 0000000 if Float.instance_method(:round).arity.zero?
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Float
def round_with_digits(ndigits=0)
ndigits = Backports::coerce_to_int(ndigits)
case
when ndigits == 0
round_without_digits
when ndigits < 0
p = 10 ** -ndigits
p > abs ? 0 : (self / p).round * p
else
p = 10 ** ndigits
prod = self * p
prod.infinite? || prod.nan? ? self : prod.round.to_f / p
end
end
Backports.alias_method_chain self, :round, :digits
end
end
backports-3.16.0/lib/backports/1.9.1/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020254 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017730 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/hash/assoc.rb 0000664 0000000 0000000 00000000321 13617065163 0021361 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :assoc
class Hash
def assoc(key)
val = fetch(key) do
return find do |k, v|
[k, v] if k == key
end
end
[key, val]
end
end
end
backports-3.16.0/lib/backports/1.9.1/hash/default_proc.rb 0000664 0000000 0000000 00000000515 13617065163 0022725 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :default_proc=
require 'backports/tools/arguments'
class Hash
def default_proc=(proc)
if proc == nil # nil accepted in Ruby 2.0
self.default = nil
self
else
replace(Hash.new(&Backports.coerce_to(proc, Proc, :to_proc)).merge!(self))
end
end
end
end
backports-3.16.0/lib/backports/1.9.1/hash/key.rb 0000664 0000000 0000000 00000000122 13617065163 0021040 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method Hash, :key, :index
backports-3.16.0/lib/backports/1.9.1/hash/rassoc.rb 0000664 0000000 0000000 00000000264 13617065163 0021551 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :rassoc
class Hash
def rassoc(value)
k = key(value)
v = fetch(k){return nil}
[k, fetch(k)] if k || v == value
end
end
end
backports-3.16.0/lib/backports/1.9.1/hash/try_convert.rb 0000664 0000000 0000000 00000000235 13617065163 0022633 0 ustar 00root root 0000000 0000000 unless Hash.respond_to? :try_convert
require 'backports/tools/arguments'
def Hash.try_convert(x)
Backports.try_convert(x, Hash, :to_hash)
end
end
backports-3.16.0/lib/backports/1.9.1/integer.rb 0000664 0000000 0000000 00000000117 13617065163 0020766 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/integer/ 0000775 0000000 0000000 00000000000 13617065163 0020442 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/integer/magnitude.rb 0000664 0000000 0000000 00000000131 13617065163 0022737 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method Integer, :magnitude, :abs
backports-3.16.0/lib/backports/1.9.1/integer/round.rb 0000664 0000000 0000000 00000001303 13617065163 0022113 0 ustar 00root root 0000000 0000000 if Integer.instance_method(:round).arity.zero?
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Integer
def round_with_digits(ndigits=0)
ndigits = Backports::coerce_to_int(ndigits)
case
when ndigits.zero?
self
when ndigits > 0
raise RangeError if ndigits >= 1<<31
Float(self)
else
pow = 10 ** (-ndigits)
return 0 if pow.is_a?(Float) # when ndigits hugely negative
remain = self % pow
comp = self < 0 ? :<= : :<
remain -= pow unless remain.send(comp, pow / 2)
self - remain
end
end
Backports.alias_method_chain self, :round, :digits
end
end
backports-3.16.0/lib/backports/1.9.1/io.rb 0000664 0000000 0000000 00000000117 13617065163 0017740 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/io/ 0000775 0000000 0000000 00000000000 13617065163 0017414 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/io/binread.rb 0000664 0000000 0000000 00000000346 13617065163 0021350 0 ustar 00root root 0000000 0000000 unless IO.respond_to? :binread
require 'backports/tools/path'
def IO.binread(file, length = nil, offset = 0)
File.open(Backports.convert_path(file),"rb") do |f|
f.seek(offset)
f.read(length)
end
end
end
backports-3.16.0/lib/backports/1.9.1/io/open.rb 0000664 0000000 0000000 00000001156 13617065163 0020705 0 ustar 00root root 0000000 0000000 fd = IO.sysopen(__FILE__)
begin
IO.open(fd, :mode => 'r'){}
rescue TypeError
require 'backports/tools/io'
require 'backports/tools/alias_method_chain'
class << IO
def open_with_options_hash(*args)
if args.size > 2 || args[1].respond_to?(:to_hash)
fd, mode, options = (args << Backports::Undefined)
args = [fd, Backports.combine_mode_and_option(mode, options)]
end
if block_given?
open_without_options_hash(*args){|f| yield f}
else
open_without_options_hash(*args)
end
end
Backports.alias_method_chain self, :open, :options_hash
end
end
backports-3.16.0/lib/backports/1.9.1/io/try_convert.rb 0000664 0000000 0000000 00000000231 13617065163 0022313 0 ustar 00root root 0000000 0000000 unless IO.respond_to? :try_convert
require 'backports/tools/arguments'
def IO.try_convert(obj)
Backports.try_convert(obj, IO, :to_io)
end
end
backports-3.16.0/lib/backports/1.9.1/io/ungetbyte.rb 0000664 0000000 0000000 00000000127 13617065163 0021747 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method IO, :ungetbyte, :ungetc
backports-3.16.0/lib/backports/1.9.1/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020611 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020265 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/kernel/__callee__.rb 0000664 0000000 0000000 00000000234 13617065163 0022632 0 ustar 00root root 0000000 0000000 unless (__callee__ || true rescue false)
require 'backports/1.8.7/kernel/__method__'
module Kernel
alias_method :__callee__, :__method__
end
end
backports-3.16.0/lib/backports/1.9.1/kernel/define_singleton_method.rb 0000664 0000000 0000000 00000000327 13617065163 0025470 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :define_singleton_method
module Kernel
def define_singleton_method(*args, &block)
class << self
self
end.send(:define_method, *args, &block)
end
end
end
backports-3.16.0/lib/backports/1.9.1/kernel/public_method.rb 0000664 0000000 0000000 00000000452 13617065163 0023431 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :public_method
module Kernel
def public_method(meth)
if respond_to?(meth) && !protected_methods.include?(meth.to_s)
method(meth)
else
raise NameError, "undefined method `#{meth}' for class `#{self.class}'"
end
end
end
end
backports-3.16.0/lib/backports/1.9.1/kernel/public_send.rb 0000664 0000000 0000000 00000000732 13617065163 0023103 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :public_send
module Kernel
def public_send(method, *args, &block)
if respond_to?(method) && !protected_methods.include?(method.to_s)
send(method, *args, &block)
else
:foo.generate_a_no_method_error_in_preparation_for_method_missing rescue nil
# otherwise a NameError might be raised when we call method_missing ourselves
method_missing(method.to_sym, *args, &block)
end
end
end
end
backports-3.16.0/lib/backports/1.9.1/kernel/require_relative.rb 0000664 0000000 0000000 00000000705 13617065163 0024163 0 ustar 00root root 0000000 0000000 unless Kernel.private_method_defined? :require_relative
require 'backports/tools/path'
module Kernel
def require_relative(relative_feature)
file = caller.first.split(/:\d/,2).first
if /\A\((.*)\)/ =~ file # eval, etc.
raise LoadError, "require_relative is called in #{$1}"
end
require File.expand_path(Backports.convert_path(relative_feature), File.dirname(file))
end
private :require_relative
end
end
backports-3.16.0/lib/backports/1.9.1/math.rb 0000664 0000000 0000000 00000000117 13617065163 0020262 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/math/ 0000775 0000000 0000000 00000000000 13617065163 0017736 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/math/log.rb 0000664 0000000 0000000 00000001650 13617065163 0021046 0 ustar 00root root 0000000 0000000 unless (Math.log(2, 2) rescue false)
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class << Math
# Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/Math.html]
def log_with_optional_base(numeric, base = Backports::Undefined)
if base.equal?(Backports::Undefined)
# Math.log(n) in 1.9.1 no longer accepts string arguments as it
# did on 1.8.x, but we won't risk redefining existing behavior
# when called with just one argument.
log_without_optional_base(numeric)
else
# Math.log(n, b) in 1.9.1 does not accept string arguments:
raise TypeError, "can't convert String into Float" if numeric.is_a?(String) || base.is_a?(String)
log_without_optional_base(numeric) / log_without_optional_base(base)
end
end
Backports.alias_method_chain self, :log, :optional_base
end
end
backports-3.16.0/lib/backports/1.9.1/math/log2.rb 0000664 0000000 0000000 00000000133 13617065163 0021123 0 ustar 00root root 0000000 0000000 unless Math.respond_to? :log2
def Math.log2(numeric)
log(numeric) / log(2)
end
end
backports-3.16.0/lib/backports/1.9.1/numeric.rb 0000664 0000000 0000000 00000000117 13617065163 0020773 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/numeric/ 0000775 0000000 0000000 00000000000 13617065163 0020447 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/numeric/round.rb 0000664 0000000 0000000 00000000575 13617065163 0022132 0 ustar 00root root 0000000 0000000 if Numeric.instance_method(:round).arity.zero?
require 'backports/tools/arguments'
require 'backports/tools/alias_method_chain'
class Numeric
def round_with_digits(ndigits=0)
ndigits = Backports::coerce_to_int(ndigits)
ndigits.zero? ? round_without_digits : Float(self).round(ndigits)
end
Backports.alias_method_chain self, :round, :digits
end
end
backports-3.16.0/lib/backports/1.9.1/proc.rb 0000664 0000000 0000000 00000000117 13617065163 0020274 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/proc/ 0000775 0000000 0000000 00000000000 13617065163 0017750 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/proc/case_compare.rb 0000664 0000000 0000000 00000000270 13617065163 0022715 0 ustar 00root root 0000000 0000000 unless Proc.new{true} === 42
class Proc
# Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/Proc.html]
alias_method :===, :call
end
end
backports-3.16.0/lib/backports/1.9.1/proc/curry.rb 0000664 0000000 0000000 00000001204 13617065163 0021436 0 ustar 00root root 0000000 0000000 unless Proc.method_defined? :curry
require 'backports/1.9.1/proc/lambda'
class Proc
def curry(argc = nil)
min_argc = arity < 0 ? -arity - 1 : arity
argc ||= min_argc
if lambda? and arity < 0 ? argc < min_argc : argc != arity
raise ArgumentError, "wrong number of arguments (#{argc} for #{min_argc})"
end
creator = lambda? ? :lambda : :proc
block = send(creator) do |*args|
if args.size >= argc
call(*args)
else
send(creator) do |*more_args|
args += more_args
block.call(*args)
end
end
end
end
end
end
backports-3.16.0/lib/backports/1.9.1/proc/lambda.rb 0000664 0000000 0000000 00000002073 13617065163 0021517 0 ustar 00root root 0000000 0000000 unless Proc.method_defined? :lambda?
require 'backports/tools/alias_method_chain'
class Proc
# Standard in Ruby 1.9. See official documentation[http://ruby-doc.org/core-1.9/classes/Proc.html]
def lambda?
!!__is_lambda__
end
attr_accessor :__is_lambda__
private :__is_lambda__
private :__is_lambda__=
end
class Method
def to_proc_with_lambda_tracking
proc = to_proc_without_lambda_tracking
proc.send :__is_lambda__=, true
proc
end
Backports.alias_method_chain self, :to_proc, :lambda_tracking
end
module Kernel
def lambda_with_lambda_tracking(&block)
l = lambda_without_lambda_tracking(&block)
l.send :__is_lambda__=, true unless block.send(:__is_lambda__) == false
l
end
def proc_with_lambda_tracking(&block)
l = proc_without_lambda_tracking(&block)
l.send :__is_lambda__=, block.send(:__is_lambda__) == true
l
end
Backports.alias_method_chain self, :lambda, :lambda_tracking
Backports.alias_method_chain self, :proc, :lambda_tracking
end
end
backports-3.16.0/lib/backports/1.9.1/proc/yield.rb 0000664 0000000 0000000 00000000123 13617065163 0021377 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method Proc, :yield, :call
backports-3.16.0/lib/backports/1.9.1/range.rb 0000664 0000000 0000000 00000000117 13617065163 0020425 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/range/ 0000775 0000000 0000000 00000000000 13617065163 0020101 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/range/cover.rb 0000664 0000000 0000000 00000000131 13617065163 0021537 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method Range, :cover?, :include?
backports-3.16.0/lib/backports/1.9.1/regexp.rb 0000664 0000000 0000000 00000000117 13617065163 0020623 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/regexp/ 0000775 0000000 0000000 00000000000 13617065163 0020277 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/regexp/try_convert.rb 0000664 0000000 0000000 00000000251 13617065163 0023200 0 ustar 00root root 0000000 0000000 unless Regexp.respond_to? :try_convert
require 'backports/tools/arguments'
def Regexp.try_convert(obj)
Backports.try_convert(obj, Regexp, :to_regexp)
end
end
backports-3.16.0/lib/backports/1.9.1/stdlib.rb 0000664 0000000 0000000 00000000042 13617065163 0020607 0 ustar 00root root 0000000 0000000 Backports::StdLib.extend_relative
backports-3.16.0/lib/backports/1.9.1/stdlib/ 0000775 0000000 0000000 00000000000 13617065163 0020266 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/stdlib/prime.rb 0000664 0000000 0000000 00000030551 13617065163 0021733 0 ustar 00root root 0000000 0000000 # frozen_string_literal: false
#
# = prime.rb
#
# Prime numbers and factorization library.
#
# Copyright::
# Copyright (c) 1998-2008 Keiju ISHITSUKA(SHL Japan Inc.)
# Copyright (c) 2008 Yuki Sonoda (Yugui)
#
# Documentation::
# Yuki Sonoda
#
require "singleton"
require "forwardable"
class Integer
# Re-composes a prime factorization and returns the product.
#
# See Prime#int_from_prime_division for more details.
def Integer.from_prime_division(pd)
Prime.int_from_prime_division(pd)
end
# Returns the factorization of +self+.
#
# See Prime#prime_division for more details.
def prime_division(generator = Prime::Generator23.new)
Prime.prime_division(self, generator)
end
# Returns true if +self+ is a prime number, else returns false.
def prime?
return self >= 2 if self <= 3
return false if self % 2 == 0 or self % 3 == 0
(5..(self**0.5).floor).step(6).each do |i|
if self % i == 0 || self % (i + 2) == 0
return false
end
end
true
end
# Iterates the given block over all prime numbers.
#
# See +Prime+#each for more details.
def Integer.each_prime(ubound, &block) # :yields: prime
Prime.each(ubound, &block)
end
end
#
# The set of all prime numbers.
#
# == Example
#
# Prime.each(100) do |prime|
# p prime #=> 2, 3, 5, 7, 11, ...., 97
# end
#
# Prime is Enumerable:
#
# Prime.first 5 # => [2, 3, 5, 7, 11]
#
# == Retrieving the instance
#
# For convenience, each instance method of +Prime+.instance can be accessed
# as a class method of +Prime+.
#
# e.g.
# Prime.instance.prime?(2) #=> true
# Prime.prime?(2) #=> true
#
# == Generators
#
# A "generator" provides an implementation of enumerating pseudo-prime
# numbers and it remembers the position of enumeration and upper bound.
# Furthermore, it is an external iterator of prime enumeration which is
# compatible with an Enumerator.
#
# +Prime+::+PseudoPrimeGenerator+ is the base class for generators.
# There are few implementations of generator.
#
# [+Prime+::+EratosthenesGenerator+]
# Uses eratosthenes' sieve.
# [+Prime+::+TrialDivisionGenerator+]
# Uses the trial division method.
# [+Prime+::+Generator23+]
# Generates all positive integers which are not divisible by either 2 or 3.
# This sequence is very bad as a pseudo-prime sequence. But this
# is faster and uses much less memory than the other generators. So,
# it is suitable for factorizing an integer which is not large but
# has many prime factors. e.g. for Prime#prime? .
class Prime
include Enumerable
include Singleton
class << self
extend Forwardable
include Enumerable
def method_added(method) # :nodoc:
(class<< self;self;end).def_delegator :instance, method
end
end
# Iterates the given block over all prime numbers.
#
# == Parameters
#
# +ubound+::
# Optional. An arbitrary positive number.
# The upper bound of enumeration. The method enumerates
# prime numbers infinitely if +ubound+ is nil.
# +generator+::
# Optional. An implementation of pseudo-prime generator.
#
# == Return value
#
# An evaluated value of the given block at the last time.
# Or an enumerator which is compatible to an +Enumerator+
# if no block given.
#
# == Description
#
# Calls +block+ once for each prime number, passing the prime as
# a parameter.
#
# +ubound+::
# Upper bound of prime numbers. The iterator stops after it
# yields all prime numbers p <= +ubound+.
#
def each(ubound = nil, generator = EratosthenesGenerator.new, &block)
generator.upper_bound = ubound
generator.each(&block)
end
# Returns true if +value+ is a prime number, else returns false.
#
# == Parameters
#
# +value+:: an arbitrary integer to be checked.
# +generator+:: optional. A pseudo-prime generator.
def prime?(value, generator = Prime::Generator23.new)
raise ArgumentError, "Expected a prime generator, got #{generator}" unless generator.respond_to? :each
raise ArgumentError, "Expected an integer, got #{value}" unless value.respond_to?(:integer?) && value.integer?
return false if value < 2
generator.each do |num|
q,r = value.divmod num
return true if q < num
return false if r == 0
end
end
# Re-composes a prime factorization and returns the product.
#
# == Parameters
# +pd+:: Array of pairs of integers. The each internal
# pair consists of a prime number -- a prime factor --
# and a natural number -- an exponent.
#
# == Example
# For [[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]], it returns:
#
# p_1**e_1 * p_2**e_2 * .... * p_n**e_n.
#
# Prime.int_from_prime_division([[2,2], [3,1]]) #=> 12
def int_from_prime_division(pd)
pd.inject(1){|value, (prime, index)|
value * prime**index
}
end
# Returns the factorization of +value+.
#
# == Parameters
# +value+:: An arbitrary integer.
# +generator+:: Optional. A pseudo-prime generator.
# +generator+.succ must return the next
# pseudo-prime number in the ascending
# order. It must generate all prime numbers,
# but may also generate non prime numbers too.
#
# === Exceptions
# +ZeroDivisionError+:: when +value+ is zero.
#
# == Example
# For an arbitrary integer:
#
# n = p_1**e_1 * p_2**e_2 * .... * p_n**e_n,
#
# prime_division(n) returns:
#
# [[p_1, e_1], [p_2, e_2], ...., [p_n, e_n]].
#
# Prime.prime_division(12) #=> [[2,2], [3,1]]
#
def prime_division(value, generator = Prime::Generator23.new)
raise ZeroDivisionError if value == 0
if value < 0
value = -value
pv = [[-1, 1]]
else
pv = []
end
generator.each do |prime|
count = 0
while (value1, mod = value.divmod(prime)
mod) == 0
value = value1
count += 1
end
if count != 0
pv.push [prime, count]
end
break if value1 <= prime
end
if value > 1
pv.push [value, 1]
end
pv
end
# An abstract class for enumerating pseudo-prime numbers.
#
# Concrete subclasses should override succ, next, rewind.
class PseudoPrimeGenerator
include Enumerable
def initialize(ubound = nil)
@ubound = ubound
end
def upper_bound=(ubound)
@ubound = ubound
end
def upper_bound
@ubound
end
# returns the next pseudo-prime number, and move the internal
# position forward.
#
# +PseudoPrimeGenerator+#succ raises +NotImplementedError+.
def succ
raise NotImplementedError, "need to define `succ'"
end
# alias of +succ+.
def next
raise NotImplementedError, "need to define `next'"
end
# Rewinds the internal position for enumeration.
#
# See +Enumerator+#rewind.
def rewind
raise NotImplementedError, "need to define `rewind'"
end
# Iterates the given block for each prime number.
def each
return self.dup unless block_given?
if @ubound
last_value = nil
loop do
prime = succ
break last_value if prime > @ubound
last_value = yield prime
end
else
loop do
yield succ
end
end
end
# see +Enumerator+#with_index.
def with_index(offset = 0)
return enum_for(:with_index, offset) { Float::INFINITY } unless block_given?
return each_with_index(&proc) if offset == 0
each do |prime|
yield prime, offset
offset += 1
end
end
# see +Enumerator+#with_object.
def with_object(obj)
return enum_for(:with_object, obj) { Float::INFINITY } unless block_given?
each do |prime|
yield prime, obj
end
end
def size
Float::INFINITY
end
end
# An implementation of +PseudoPrimeGenerator+.
#
# Uses +EratosthenesSieve+.
class EratosthenesGenerator < PseudoPrimeGenerator
def initialize
@last_prime_index = -1
super
end
def succ
@last_prime_index += 1
EratosthenesSieve.instance.get_nth_prime(@last_prime_index)
end
def rewind
initialize
end
alias next succ
end
# An implementation of +PseudoPrimeGenerator+ which uses
# a prime table generated by trial division.
class TrialDivisionGenerator= @primes.length
# Only check for prime factors up to the square root of the potential primes,
# but without the performance hit of an actual square root calculation.
if @next_to_check + 4 > @ulticheck_next_squared
@ulticheck_index += 1
@ulticheck_next_squared = @primes.at(@ulticheck_index + 1) ** 2
end
# Only check numbers congruent to one and five, modulo six. All others
# are divisible by two or three. This also allows us to skip checking against
# two and three.
@primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil?
@next_to_check += 4
@primes.push @next_to_check if @primes[2..@ulticheck_index].find {|prime| @next_to_check % prime == 0 }.nil?
@next_to_check += 2
end
@primes[index]
end
end
# Internal use. An implementation of eratosthenes' sieve
class EratosthenesSieve
include Singleton
def initialize
@primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101]
# @max_checked must be an even number
@max_checked = @primes.last + 1
end
def get_nth_prime(n)
compute_primes while @primes.size <= n
@primes[n]
end
private
def compute_primes
# max_segment_size must be an even number
max_segment_size = 1e6.to_i
max_cached_prime = @primes.last
# do not double count primes if #compute_primes is interrupted
# by Timeout.timeout
@max_checked = max_cached_prime + 1 if max_cached_prime > @max_checked
segment_min = @max_checked
segment_max = [segment_min + max_segment_size, max_cached_prime * 2].min
root = Integer(Math.sqrt(segment_max).floor)
segment = ((segment_min + 1) .. segment_max).step(2).to_a
(1..Float::INFINITY).each do |sieving|
prime = @primes[sieving]
break if prime > root
composite_index = (-(segment_min + 1 + prime) / 2) % prime
while composite_index < segment.size do
segment[composite_index] = nil
composite_index += prime
end
end
@primes.concat(segment.compact!)
@max_checked = segment_max
end
end
end
backports-3.16.0/lib/backports/1.9.1/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020637 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/string/ 0000775 0000000 0000000 00000000000 13617065163 0020313 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/string/ascii_only.rb 0000664 0000000 0000000 00000000200 13617065163 0022761 0 ustar 00root root 0000000 0000000 unless String.method_defined? :ascii_only?
class String
def ascii_only?
!(self =~ /[^\x00-\x7f]/)
end
end
end
backports-3.16.0/lib/backports/1.9.1/string/chr.rb 0000664 0000000 0000000 00000000150 13617065163 0021410 0 ustar 00root root 0000000 0000000 unless String.method_defined? :chr
class String
def chr
chars.first || ""
end
end
end
backports-3.16.0/lib/backports/1.9.1/string/clear.rb 0000664 0000000 0000000 00000000171 13617065163 0021725 0 ustar 00root root 0000000 0000000 unless String.method_defined? :clear
class String
def clear
self[0,length] = ""
self
end
end
end
backports-3.16.0/lib/backports/1.9.1/string/codepoints.rb 0000664 0000000 0000000 00000000306 13617065163 0023006 0 ustar 00root root 0000000 0000000 unless String.method_defined? :codepoints
class String
def codepoints
return to_enum(:codepoints) unless block_given?
unpack("U*").each{|cp| yield cp}
self
end
end
end
backports-3.16.0/lib/backports/1.9.1/string/each_codepoint.rb 0000664 0000000 0000000 00000000144 13617065163 0023603 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method String, :each_codepoint, :codepoints
backports-3.16.0/lib/backports/1.9.1/string/getbyte.rb 0000664 0000000 0000000 00000000125 13617065163 0022301 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method String, :getbyte, :[]
backports-3.16.0/lib/backports/1.9.1/string/ord.rb 0000664 0000000 0000000 00000000216 13617065163 0021423 0 ustar 00root root 0000000 0000000 unless String.method_defined? :ord
class String
def ord
codepoints.first or raise ArgumentError, "empty string"
end
end
end
backports-3.16.0/lib/backports/1.9.1/string/setbyte.rb 0000664 0000000 0000000 00000000126 13617065163 0022316 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method'
Backports.alias_method String, :setbyte, :[]=
backports-3.16.0/lib/backports/1.9.1/string/try_convert.rb 0000664 0000000 0000000 00000000242 13617065163 0023214 0 ustar 00root root 0000000 0000000 unless String.respond_to? :try_convert
require 'backports/tools/arguments'
def String.try_convert(x)
Backports.try_convert(x, String, :to_str)
end
end
backports-3.16.0/lib/backports/1.9.1/symbol.rb 0000664 0000000 0000000 00000000117 13617065163 0020636 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.1/symbol/ 0000775 0000000 0000000 00000000000 13617065163 0020312 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.1/symbol/capitalize.rb 0000664 0000000 0000000 00000000173 13617065163 0022765 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :capitalize
class Symbol
def capitalize
to_s.capitalize.to_sym
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/casecmp.rb 0000664 0000000 0000000 00000000246 13617065163 0022254 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :casecmp
class Symbol
def casecmp(with)
return nil unless with.is_a? Symbol
to_s.casecmp(with.to_s)
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/comparable.rb 0000664 0000000 0000000 00000000260 13617065163 0022742 0 ustar 00root root 0000000 0000000 unless Symbol < Comparable
class Symbol
alias_method :dont_override_equal_please, :==
include Comparable
alias_method :==, :dont_override_equal_please
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/comparison.rb 0000664 0000000 0000000 00000000231 13617065163 0023005 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :<=>
class Symbol
def <=>(with)
return nil unless with.is_a? Symbol
to_s <=> with.to_s
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/downcase.rb 0000664 0000000 0000000 00000000165 13617065163 0022444 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :downcase
class Symbol
def downcase
to_s.downcase.to_sym
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/element_reference.rb 0000664 0000000 0000000 00000000147 13617065163 0024310 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :[]
class Symbol
def [](*args)
to_s[*args]
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/empty.rb 0000664 0000000 0000000 00000000150 13617065163 0021771 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :empty?
class Symbol
def empty?
to_s.empty?
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/length.rb 0000664 0000000 0000000 00000000150 13617065163 0022114 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :length
class Symbol
def length
to_s.length
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/match.rb 0000664 0000000 0000000 00000000213 13617065163 0021727 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :match
class Symbol
def match(with)
to_s =~ with
end
alias_method :=~, :match
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/next.rb 0000664 0000000 0000000 00000000046 13617065163 0021615 0 ustar 00root root 0000000 0000000 require 'backports/1.9.1/symbol/succ'
backports-3.16.0/lib/backports/1.9.1/symbol/size.rb 0000664 0000000 0000000 00000000142 13617065163 0021606 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :size
class Symbol
def size
to_s.size
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/succ.rb 0000664 0000000 0000000 00000000207 13617065163 0021573 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :succ
class Symbol
def succ
to_s.succ.to_sym
end
alias_method :next, :succ
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/swapcase.rb 0000664 0000000 0000000 00000000165 13617065163 0022447 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :swapcase
class Symbol
def swapcase
to_s.swapcase.to_sym
end
end
end
backports-3.16.0/lib/backports/1.9.1/symbol/upcase.rb 0000664 0000000 0000000 00000000157 13617065163 0022122 0 ustar 00root root 0000000 0000000 unless Symbol.method_defined? :upcase
class Symbol
def upcase
to_s.upcase.to_sym
end
end
end
backports-3.16.0/lib/backports/1.9.2.rb 0000664 0000000 0000000 00000000170 13617065163 0017331 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 1.9.2
require 'backports/1.9.1'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/ 0000775 0000000 0000000 00000000000 13617065163 0017006 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020450 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/array/ 0000775 0000000 0000000 00000000000 13617065163 0020124 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/array/keep_if.rb 0000664 0000000 0000000 00000000255 13617065163 0022055 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :keep_if
class Array
def keep_if
return to_enum(:keep_if) unless block_given?
delete_if{|elem| !yield elem}
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/product.rb 0000664 0000000 0000000 00000001464 13617065163 0022136 0 ustar 00root root 0000000 0000000 if ([1].product([2]){break false} rescue true)
require 'backports/tools/arguments'
require 'backports/tools/alias_method_chain'
require 'backports/1.8.7/array/product'
class Array
def product_with_block(*arg, &block)
return product_without_block(*arg) unless block_given?
# Same implementation as 1.8.7, but yielding
arg.map!{|ary| Backports.coerce_to_ary(ary)}
arg.reverse! # to get the results in the same order as in MRI, vary the last argument first
arg.push self
outer_lambda = arg.inject(block) do |proc, values|
lambda do |partial|
values.each do |val|
proc.call(partial.dup << val)
end
end
end
outer_lambda.call([])
self
end
Backports.alias_method_chain self, :product, :block
end
end
backports-3.16.0/lib/backports/1.9.2/array/repeated_combination.rb 0000664 0000000 0000000 00000001377 13617065163 0024634 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :repeated_combination
require 'backports/tools/arguments'
require 'backports/1.8.7/array/index'
class Array
# Note: Combinations are not yielded in the same order as MRI.
# This is not a bug; the spec states that the order is implementation dependent
def repeated_combination(num)
return to_enum(:repeated_combination, num) unless block_given?
num = Backports.coerce_to_int(num)
if num <= 0
yield [] if num == 0
else
copy = dup
indices = Array.new(num, 0)
indices[-1] = size
while dec = indices.index{|x| x != 0}
indices.fill indices[dec]-1, 0, dec + 1
yield copy.values_at(*indices)
end
end
self
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/repeated_permutation.rb 0000664 0000000 0000000 00000001422 13617065163 0024670 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :repeated_permutation
require 'backports/tools/arguments'
require 'backports/1.8.7/array/index'
class Array
# Note: Permutations are not yielded in the same order as MRI.
# This is not a bug; the spec states that the order is implementation dependent!!!
def repeated_permutation(num)
return to_enum(:repeated_permutation, num) unless block_given?
num = Backports.coerce_to_int(num)
if num <= 0
yield [] if num == 0
else
copy = dup
indices = Array.new(num, 0)
indices[-1] = size
while dec = indices.index{|x| x != 0}
indices.fill size-1, 0, dec
indices[dec] -= 1
yield copy.values_at(*indices)
end
end
self
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/rotate.rb 0000664 0000000 0000000 00000000522 13617065163 0021746 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :rotate
class Array
def rotate(n=1)
Array.new(self).rotate!(n)
end
end
end
unless Array.method_defined? :rotate!
require 'backports/tools/arguments'
class Array
def rotate!(n=1)
n = Backports.coerce_to_int(n) % (empty? ? 1 : size)
concat(slice!(0, n))
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/select.rb 0000664 0000000 0000000 00000000254 13617065163 0021731 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :select!
class Array
def select!
return to_enum(:select!) unless block_given?
reject!{|elem| ! yield elem}
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/sort_by.rb 0000664 0000000 0000000 00000000342 13617065163 0022131 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :sort_by!
class Array
def sort_by!
return to_enum(:sort_by!) unless block_given?
raise "can't modify frozen array" if frozen?
replace sort_by{|e| yield e}
end
end
end
backports-3.16.0/lib/backports/1.9.2/array/uniq.rb 0000664 0000000 0000000 00000001311 13617065163 0021421 0 ustar 00root root 0000000 0000000 unless [1,2].uniq{}.size == 1
require 'backports/tools/alias_method_chain'
class Array
def uniq_with_block
return uniq_without_block unless block_given?
h = {}
each do |elem|
key = yield(elem)
h[key] = elem unless h.has_key?(key)
end
h.values
end
Backports.alias_method_chain self, :uniq, :block
end
end
unless [1,2].uniq!{}
require 'backports/tools/alias_method_chain'
class Array
def uniq_with_block!
replace self if frozen? # force error
return uniq_without_block! unless block_given?
u = uniq{|e| yield e}
replace u unless u.size == size
end
Backports.alias_method_chain self, :uniq!, :block
end
end
backports-3.16.0/lib/backports/1.9.2/complex.rb 0000664 0000000 0000000 00000000117 13617065163 0021001 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/complex/ 0000775 0000000 0000000 00000000000 13617065163 0020455 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/complex/to_r.rb 0000664 0000000 0000000 00000000354 13617065163 0021747 0 ustar 00root root 0000000 0000000 if Object.const_defined? :Complex
unless Complex.method_defined? :to_r
class Complex
def to_r
raise RangeError, "Can't convert #{self} into Rational" unless imag.eql?(0)
real.to_r
end
end
end
end
backports-3.16.0/lib/backports/1.9.2/dir.rb 0000664 0000000 0000000 00000000117 13617065163 0020110 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/dir/ 0000775 0000000 0000000 00000000000 13617065163 0017564 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/dir/home.rb 0000664 0000000 0000000 00000000141 13617065163 0021035 0 ustar 00root root 0000000 0000000 unless Dir.respond_to? :home
def Dir.home(user = "")
File.expand_path "~#{user}"
end
end
backports-3.16.0/lib/backports/1.9.2/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021451 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021125 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/enumerable/chunk.rb 0000664 0000000 0000000 00000002474 13617065163 0022571 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :chunk
require 'backports/1.9.1/enumerator/new'
module Enumerable
def chunk(initial_state = nil, &original_block)
raise ArgumentError, "no block given" unless block_given?
::Enumerator.new do |yielder|
previous = nil
accumulate = []
block = initial_state.nil? ? original_block : Proc.new{|val| original_block.call(val, initial_state.clone)}
each do |val|
key = block.call(val)
if key.nil? || (key.is_a?(Symbol) && key.to_s[0,1] == "_")
yielder.yield [previous, accumulate] unless accumulate.empty?
accumulate = []
previous = nil
case key
when nil, :_separator
when :_alone
yielder.yield [key, [val]]
else
raise RuntimeError, "symbol beginning with an underscore are reserved"
end
else
if previous.nil? || previous == key
accumulate << val
else
yielder.yield [previous, accumulate] unless accumulate.empty?
accumulate = [val]
end
previous = key
end
end
# what to do in case of a break?
yielder.yield [previous, accumulate] unless accumulate.empty?
end
end
end
end
backports-3.16.0/lib/backports/1.9.2/enumerable/collect_concat.rb 0000664 0000000 0000000 00000000056 13617065163 0024427 0 ustar 00root root 0000000 0000000 require 'backports/1.9.2/enumerable/flat_map'
backports-3.16.0/lib/backports/1.9.2/enumerable/each_entry.rb 0000664 0000000 0000000 00000000413 13617065163 0023571 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :each_entry
module Enumerable
def each_entry(*pass)
return to_enum(:each_entry, *pass) unless block_given?
each(*pass) do |*args|
yield args.size == 1 ? args[0] : args
end
self
end
end
end
backports-3.16.0/lib/backports/1.9.2/enumerable/flat_map.rb 0000664 0000000 0000000 00000000536 13617065163 0023241 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :flat_map
module Enumerable
def flat_map
return to_enum(:flat_map) unless block_given?
r = []
each do |*args|
result = yield(*args)
result.respond_to?(:to_ary) ? r.concat(result) : r.push(result)
end
r
end
alias_method :collect_concat, :flat_map
end
end
backports-3.16.0/lib/backports/1.9.2/enumerable/slice_before.rb 0000664 0000000 0000000 00000001650 13617065163 0024075 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :slice_before
require 'backports/tools/arguments'
require 'backports/1.9.1/enumerator/new'
module Enumerable
def slice_before(arg = Backports::Undefined, &block)
if block_given?
has_init = !(arg.equal? Backports::Undefined)
else
raise ArgumentError, "wrong number of arguments (0 for 1)" if arg.equal? Backports::Undefined
block = Proc.new{|elem| arg === elem }
end
Enumerator.new do |yielder|
init = arg.dup if has_init
accumulator = nil
each do |elem|
start_new = has_init ? block.call(elem, init) : block.call(elem)
if start_new
yielder.yield accumulator if accumulator
accumulator = [elem]
else
accumulator ||= []
accumulator << elem
end
end
yielder.yield accumulator if accumulator
end
end
end
end
backports-3.16.0/lib/backports/1.9.2/float.rb 0000664 0000000 0000000 00000000117 13617065163 0020437 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/float/ 0000775 0000000 0000000 00000000000 13617065163 0020113 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/float/infinity.rb 0000664 0000000 0000000 00000000106 13617065163 0022266 0 ustar 00root root 0000000 0000000 unless Float.const_defined? :INFINITY
Float::INFINITY = 1.0/0.0
end
backports-3.16.0/lib/backports/1.9.2/float/nan.rb 0000664 0000000 0000000 00000000074 13617065163 0021215 0 ustar 00root root 0000000 0000000 unless Float.const_defined? :NAN
Float::NAN = 0.0/0.0
end
backports-3.16.0/lib/backports/1.9.2/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020255 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017731 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/hash/keep_if.rb 0000664 0000000 0000000 00000000270 13617065163 0021657 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :keep_if
class Hash
def keep_if
return to_enum(:keep_if) unless block_given?
delete_if{|key, value| ! yield key, value}
end
end
end
backports-3.16.0/lib/backports/1.9.2/hash/select.rb 0000664 0000000 0000000 00000000422 13617065163 0021533 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :select!
class Hash
def select!
return to_enum(:select!) unless block_given?
raise "can't modify frozen hash" if frozen? # reject! won't do it for empty hashes...
reject!{|key, value| ! yield key, value}
end
end
end
backports-3.16.0/lib/backports/1.9.2/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020612 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.2/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020266 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/kernel/singleton_class.rb 0000664 0000000 0000000 00000000210 13617065163 0023773 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :singleton_class
module Kernel
def singleton_class
class << self; self; end
end
end
end
backports-3.16.0/lib/backports/1.9.2/random.rb 0000664 0000000 0000000 00000000052 13617065163 0020610 0 ustar 00root root 0000000 0000000 autoload :Random, "backports/random/load"
backports-3.16.0/lib/backports/1.9.2/stdlib.rb 0000664 0000000 0000000 00000000042 13617065163 0020610 0 ustar 00root root 0000000 0000000 Backports::StdLib.extend_relative
backports-3.16.0/lib/backports/1.9.2/stdlib/ 0000775 0000000 0000000 00000000000 13617065163 0020267 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/stdlib/matrix.rb 0000664 0000000 0000000 00000132322 13617065163 0022123 0 ustar 00root root 0000000 0000000 # encoding: utf-8
#
# = matrix.rb
#
# An implementation of Matrix and Vector classes.
#
# See classes Matrix and Vector for documentation.
#
# Current Maintainer:: Marc-André Lafortune
# Original Author:: Keiju ISHITSUKA
# Original Documentation:: Gavin Sinclair (sourced from Ruby in a Nutshell (Matsumoto, O'Reilly))
##
require "e2mmap.rb"
module ExceptionForMatrix # :nodoc:
def_e2message(TypeError, "wrong argument type %s (expected %s)")
def_e2message(ArgumentError, "Wrong # of arguments(%d for %d)")
def_exception("ErrOperationNotDefined", "Operation(%s) can\\'t be defined: %s op %s") unless const_defined?(:ErrOperationNotDefined)
def_exception("ErrOperationNotImplemented", "Sorry, Operation(%s) not implemented: %s op %s") unless const_defined?(:ErrOperationNotImplemented)
end
#
# The +Matrix+ class represents a mathematical matrix. It provides methods for creating
# matrices, operating on them arithmetically and algebraically,
# and determining their mathematical properties (trace, rank, inverse, determinant).
#
# == Method Catalogue
#
# To create a matrix:
# * Matrix[*rows]
# * Matrix.[](*rows)
# * Matrix.rows(rows, copy = true)
# * Matrix.columns(columns)
# * Matrix.build(row_size, column_size, &block)
# * Matrix.diagonal(*values)
# * Matrix.scalar(n, value)
# * Matrix.identity(n)
# * Matrix.unit(n)
# * Matrix.I(n)
# * Matrix.zero(n)
# * Matrix.row_vector(row)
# * Matrix.column_vector(column)
#
# To access Matrix elements/columns/rows/submatrices/properties:
# * #[](i, j)
# * #row_size
# * #column_size
# * #row(i)
# * #column(j)
# * #collect
# * #map
# * #each
# * #each_with_index
# * #find_index
# * #minor(*param)
#
# Properties of a matrix:
# * #diagonal?
# * #empty?
# * #hermitian?
# * #lower_triangular?
# * #normal?
# * #orthogonal?
# * #permutation?
# * #real?
# * #regular?
# * #singular?
# * #square?
# * #symmetric?
# * #unitary?
# * #upper_triangular?
# * #zero?
#
# Matrix arithmetic:
# * #*(m)
# * #+(m)
# * #-(m)
# * #/(m)
# * #inverse
# * #inv
# * #**
#
# Matrix functions:
# * #determinant
# * #det
# * #rank
# * #round
# * #trace
# * #tr
# * #transpose
# * #t
#
# Matrix decompositions:
# * #eigen
# * #eigensystem
# * #lup
# * #lup_decomposition
#
# Complex arithmetic:
# * conj
# * conjugate
# * imag
# * imaginary
# * real
# * rect
# * rectangular
#
# Conversion to other data types:
# * #coerce(other)
# * #row_vectors
# * #column_vectors
# * #to_a
#
# String representations:
# * #to_s
# * #inspect
#
require 'backports/tools/suppress_verbose_warnings' # *** Backports addition
Backports.suppress_verbose_warnings do # *** Backports addition
class Matrix
include Enumerable
include ExceptionForMatrix
unless autoload?(:EigenvalueDecomposition)
autoload :EigenvalueDecomposition, File.expand_path("../matrix/eigenvalue_decomposition", __FILE__) if 42.respond_to?(:conj)
autoload :LUPDecomposition, File.expand_path("../matrix/lup_decomposition", __FILE__)
end
# instance creations
private_class_method :new
attr_reader :rows
protected :rows
#
# Creates a matrix where each argument is a row.
# Matrix[ [25, 93], [-1, 66] ]
# => 25 93
# -1 66
#
def Matrix.[](*rows)
rows(rows, false)
end
#
# Creates a matrix where +rows+ is an array of arrays, each of which is a row
# of the matrix. If the optional argument +copy+ is false, use the given
# arrays as the internal structure of the matrix without copying.
# Matrix.rows([[25, 93], [-1, 66]])
# => 25 93
# -1 66
#
def Matrix.rows(rows, copy = true)
rows = convert_to_array(rows)
rows.map! do |row|
convert_to_array(row, copy)
end
size = (rows[0] || []).size
rows.each do |row|
Matrix.Raise ErrDimensionMismatch, "row size differs (#{row.size} should be #{size})" unless row.size == size
end
new rows, size
end
#
# Creates a matrix using +columns+ as an array of column vectors.
# Matrix.columns([[25, 93], [-1, 66]])
# => 25 -1
# 93 66
#
def Matrix.columns(columns)
rows(columns, false).transpose
end
#
# Creates a matrix of size +row_size+ x +column_size+.
# It fills the values by calling the given block,
# passing the current row and column.
# Returns an enumerator if no block is given.
#
# m = Matrix.build(2, 4) {|row, col| col - row }
# => Matrix[[0, 1, 2, 3], [-1, 0, 1, 2]]
# m = Matrix.build(3) { rand }
# => a 3x3 matrix with random elements
#
def Matrix.build(row_size, column_size = row_size)
row_size = CoercionHelper.coerce_to_int(row_size)
column_size = CoercionHelper.coerce_to_int(column_size)
raise ArgumentError if row_size < 0 || column_size < 0
return to_enum(:build, row_size, column_size) unless block_given?
rows = Array.new(row_size) do |i|
Array.new(column_size) do |j|
yield i, j
end
end
new rows, column_size
end
#
# Creates a matrix where the diagonal elements are composed of +values+.
# Matrix.diagonal(9, 5, -3)
# => 9 0 0
# 0 5 0
# 0 0 -3
#
def Matrix.diagonal(*values)
size = values.size
rows = Array.new(size) {|j|
row = Array.new(size, 0)
row[j] = values[j]
row
}
new rows
end
#
# Creates an +n+ by +n+ diagonal matrix where each diagonal element is
# +value+.
# Matrix.scalar(2, 5)
# => 5 0
# 0 5
#
def Matrix.scalar(n, value)
diagonal(*Array.new(n, value))
end
#
# Creates an +n+ by +n+ identity matrix.
# Matrix.identity(2)
# => 1 0
# 0 1
#
def Matrix.identity(n)
scalar(n, 1)
end
class << Matrix
alias unit identity
alias I identity
end
#
# Creates a zero matrix.
# Matrix.zero(2)
# => 0 0
# 0 0
#
def Matrix.zero(row_size, column_size = row_size)
rows = Array.new(row_size){Array.new(column_size, 0)}
new rows, column_size
end
#
# Creates a single-row matrix where the values of that row are as given in
# +row+.
# Matrix.row_vector([4,5,6])
# => 4 5 6
#
def Matrix.row_vector(row)
row = convert_to_array(row)
new [row]
end
#
# Creates a single-column matrix where the values of that column are as given
# in +column+.
# Matrix.column_vector([4,5,6])
# => 4
# 5
# 6
#
def Matrix.column_vector(column)
column = convert_to_array(column)
new [column].transpose, 1
end
#
# Creates a empty matrix of +row_size+ x +column_size+.
# At least one of +row_size+ or +column_size+ must be 0.
#
# m = Matrix.empty(2, 0)
# m == Matrix[ [], [] ]
# => true
# n = Matrix.empty(0, 3)
# n == Matrix.columns([ [], [], [] ])
# => true
# m * n
# => Matrix[[0, 0, 0], [0, 0, 0]]
#
def Matrix.empty(row_size = 0, column_size = 0)
Matrix.Raise ArgumentError, "One size must be 0" if column_size != 0 && row_size != 0
Matrix.Raise ArgumentError, "Negative size" if column_size < 0 || row_size < 0
new([[]]*row_size, column_size)
end
#
# Matrix.new is private; use Matrix.rows, columns, [], etc... to create.
#
def initialize(rows, column_size = rows[0].size)
# No checking is done at this point. rows must be an Array of Arrays.
# column_size must be the size of the first row, if there is one,
# otherwise it *must* be specified and can be any integer >= 0
@rows = rows
@column_size = column_size
end
def new_matrix(rows, column_size = rows[0].size) # :nodoc:
self.class.send(:new, rows, column_size) # bypass privacy of Matrix.new
end
private :new_matrix
#
# Returns element (+i+,+j+) of the matrix. That is: row +i+, column +j+.
#
def [](i, j)
@rows.fetch(i){return nil}[j]
end
alias element []
alias component []
def []=(i, j, v)
@rows[i][j] = v
end
alias set_element []=
alias set_component []=
private :[]=, :set_element, :set_component
#
# Returns the number of rows.
#
def row_size
@rows.size
end
#
# Returns the number of columns.
#
attr_reader :column_size
#
# Returns row vector number +i+ of the matrix as a Vector (starting at 0 like
# an array). When a block is given, the elements of that vector are iterated.
#
def row(i, &block) # :yield: e
if block_given?
@rows.fetch(i){return self}.each(&block)
self
else
Vector.elements(@rows.fetch(i){return nil})
end
end
#
# Returns column vector number +j+ of the matrix as a Vector (starting at 0
# like an array). When a block is given, the elements of that vector are
# iterated.
#
def column(j) # :yield: e
if block_given?
return self if j >= column_size || j < -column_size
row_size.times do |i|
yield @rows[i][j]
end
self
else
return nil if j >= column_size || j < -column_size
col = Array.new(row_size) {|i|
@rows[i][j]
}
Vector.elements(col, false)
end
end
#
# Returns a matrix that is the result of iteration of the given block over all
# elements of the matrix.
# Matrix[ [1,2], [3,4] ].collect { |e| e**2 }
# => 1 4
# 9 16
#
def collect(&block) # :yield: e
return to_enum(:collect) unless block_given?
rows = @rows.collect{|row| row.collect(&block)}
new_matrix rows, column_size
end
alias map collect
#
# Yields all elements of the matrix, starting with those of the first row,
# or returns an Enumerator is no block given.
# Elements can be restricted by passing an argument:
# * :all (default): yields all elements
# * :diagonal: yields only elements on the diagonal
# * :off_diagonal: yields all elements except on the diagonal
# * :lower: yields only elements on or below the diagonal
# * :strict_lower: yields only elements below the diagonal
# * :strict_upper: yields only elements above the diagonal
# * :upper: yields only elements on or above the diagonal
#
# Matrix[ [1,2], [3,4] ].each { |e| puts e }
# # => prints the numbers 1 to 4
# Matrix[ [1,2], [3,4] ].each(:strict_lower).to_a # => [3]
#
def each(which = :all) # :yield: e
return to_enum(:each, which) unless block_given?
last = column_size - 1
case which
when :all
block = Proc.new
@rows.each do |row|
row.each(&block)
end
when :diagonal
@rows.each_with_index do |row, row_index|
yield row.fetch(row_index){return self}
end
when :off_diagonal
@rows.each_with_index do |row, row_index|
column_size.times do |col_index|
yield row[col_index] unless row_index == col_index
end
end
when :lower
@rows.each_with_index do |row, row_index|
0.upto([row_index, last].min) do |col_index|
yield row[col_index]
end
end
when :strict_lower
@rows.each_with_index do |row, row_index|
[row_index, column_size].min.times do |col_index|
yield row[col_index]
end
end
when :strict_upper
@rows.each_with_index do |row, row_index|
(row_index+1).upto(last) do |col_index|
yield row[col_index]
end
end
when :upper
@rows.each_with_index do |row, row_index|
row_index.upto(last) do |col_index|
yield row[col_index]
end
end
else
Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
#
# Same as #each, but the row index and column index in addition to the element
#
# Matrix[ [1,2], [3,4] ].each_with_index do |e, row, col|
# puts "#{e} at #{row}, #{col}"
# end
# # => Prints:
# # 1 at 0, 0
# # 2 at 0, 1
# # 3 at 1, 0
# # 4 at 1, 1
#
def each_with_index(which = :all) # :yield: e, row, column
return to_enum(:each_with_index, which) unless block_given?
last = column_size - 1
case which
when :all
@rows.each_with_index do |row, row_index|
row.each_with_index do |e, col_index|
yield e, row_index, col_index
end
end
when :diagonal
@rows.each_with_index do |row, row_index|
yield row.fetch(row_index){return self}, row_index, row_index
end
when :off_diagonal
@rows.each_with_index do |row, row_index|
column_size.times do |col_index|
yield row[col_index], row_index, col_index unless row_index == col_index
end
end
when :lower
@rows.each_with_index do |row, row_index|
0.upto([row_index, last].min) do |col_index|
yield row[col_index], row_index, col_index
end
end
when :strict_lower
@rows.each_with_index do |row, row_index|
[row_index, column_size].min.times do |col_index|
yield row[col_index], row_index, col_index
end
end
when :strict_upper
@rows.each_with_index do |row, row_index|
(row_index+1).upto(last) do |col_index|
yield row[col_index], row_index, col_index
end
end
when :upper
@rows.each_with_index do |row, row_index|
row_index.upto(last) do |col_index|
yield row[col_index], row_index, col_index
end
end
else
Matrix.Raise ArgumentError, "expected #{which.inspect} to be one of :all, :diagonal, :off_diagonal, :lower, :strict_lower, :strict_upper or :upper"
end
self
end
SELECTORS = {:all => true, :diagonal => true, :off_diagonal => true, :lower => true, :strict_lower => true, :strict_upper => true, :upper => true}.freeze unless const_defined?(:SELECTORS)
#
# :call-seq:
# index(value, selector = :all) -> [row, column]
# index(selector = :all){ block } -> [row, column]
# index(selector = :all) -> an_enumerator
#
# The index method is specialized to return the index as [row, column]
# It also accepts an optional +selector+ argument, see #each for details.
#
# Matrix[ [1,2], [3,4] ].index(&:even?) # => [0, 1]
# Matrix[ [1,1], [1,1] ].index(1, :strict_lower) # => [1, 0]
#
def index(*args)
raise ArgumentError, "wrong number of arguments(#{args.size} for 0-2)" if args.size > 2
which = (args.size == 2 || SELECTORS.include?(args.last)) ? args.pop : :all
return to_enum(:find_index, which, *args) unless block_given? || args.size == 1
if args.size == 1
value = args.first
each_with_index(which) do |e, row_index, col_index|
return row_index, col_index if e == value
end
else
each_with_index(which) do |e, row_index, col_index|
return row_index, col_index if yield e
end
end
nil
end
alias_method :find_index, :index
#
# Returns a section of the matrix. The parameters are either:
# * start_row, nrows, start_col, ncols; OR
# * row_range, col_range
#
# Matrix.diagonal(9, 5, -3).minor(0..1, 0..2)
# => 9 0 0
# 0 5 0
#
# Like Array#[], negative indices count backward from the end of the
# row or column (-1 is the last element). Returns nil if the starting
# row or column is greater than row_size or column_size respectively.
#
def minor(*param)
case param.size
when 2
row_range, col_range = param
from_row = row_range.first
from_row += row_size if from_row < 0
to_row = row_range.end
to_row += row_size if to_row < 0
to_row += 1 unless row_range.exclude_end?
size_row = to_row - from_row
from_col = col_range.first
from_col += column_size if from_col < 0
to_col = col_range.end
to_col += column_size if to_col < 0
to_col += 1 unless col_range.exclude_end?
size_col = to_col - from_col
when 4
from_row, size_row, from_col, size_col = param
return nil if size_row < 0 || size_col < 0
from_row += row_size if from_row < 0
from_col += column_size if from_col < 0
else
Matrix.Raise ArgumentError, param.inspect
end
return nil if from_row > row_size || from_col > column_size || from_row < 0 || from_col < 0
rows = @rows[from_row, size_row].collect{|row|
row[from_col, size_col]
}
new_matrix rows, [column_size - from_col, size_col].min
end
#--
# TESTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Returns +true+ is this is a diagonal matrix.
# Raises an error if matrix is not square.
#
def diagonal?
Matrix.Raise ErrDimensionMismatch unless square?
each(:off_diagonal).all?(&:zero?)
end
#
# Returns +true+ if this is an empty matrix, i.e. if the number of rows
# or the number of columns is 0.
#
def empty?
column_size == 0 || row_size == 0
end
#
# Returns +true+ is this is an hermitian matrix.
# Raises an error if matrix is not square.
#
def hermitian?
Matrix.Raise ErrDimensionMismatch unless square?
each_with_index(:strict_upper).all? do |e, row, col|
e == rows[col][row].conj
end
end if 42.respond_to?(:conj)
#
# Returns +true+ is this is a lower triangular matrix.
#
def lower_triangular?
each(:strict_upper).all?(&:zero?)
end
#
# Returns +true+ is this is a normal matrix.
# Raises an error if matrix is not square.
#
def normal?
Matrix.Raise ErrDimensionMismatch unless square?
rows.each_with_index do |row_i, i|
rows.each_with_index do |row_j, j|
s = 0
rows.each_with_index do |row_k, k|
s += row_i[k] * row_j[k].conj - row_k[i].conj * row_k[j]
end
return false unless s == 0
end
end
true
end if 42.respond_to?(:conj)
#
# Returns +true+ is this is an orthogonal matrix
# Raises an error if matrix is not square.
#
def orthogonal?
Matrix.Raise ErrDimensionMismatch unless square?
rows.each_with_index do |row, i|
column_size.times do |j|
s = 0
row_size.times do |k|
s += row[k] * rows[k][j]
end
return false unless s == (i == j ? 1 : 0)
end
end
true
end
#
# Returns +true+ is this is a permutation matrix
# Raises an error if matrix is not square.
#
def permutation?
Matrix.Raise ErrDimensionMismatch unless square?
cols = Array.new(column_size)
rows.each_with_index do |row, i|
found = false
row.each_with_index do |e, j|
if e == 1
return false if found || cols[j]
found = cols[j] = true
elsif e != 0
return false
end
end
return false unless found
end
true
end
#
# Returns +true+ if all entries of the matrix are real.
#
def real?
all?(&:real?)
end
#
# Returns +true+ if this is a regular (i.e. non-singular) matrix.
#
def regular?
not singular?
end
#
# Returns +true+ is this is a singular matrix.
#
def singular?
determinant == 0
end
#
# Returns +true+ is this is a square matrix.
#
def square?
column_size == row_size
end
#
# Returns +true+ is this is a symmetric matrix.
# Raises an error if matrix is not square.
#
def symmetric?
Matrix.Raise ErrDimensionMismatch unless square?
each_with_index(:strict_upper) do |e, row, col|
return false if e != rows[col][row]
end
true
end
#
# Returns +true+ is this is a unitary matrix
# Raises an error if matrix is not square.
#
def unitary?
Matrix.Raise ErrDimensionMismatch unless square?
rows.each_with_index do |row, i|
column_size.times do |j|
s = 0
row_size.times do |k|
s += row[k].conj * rows[k][j]
end
return false unless s == (i == j ? 1 : 0)
end
end
true
end if 42.respond_to?(:conj)
#
# Returns +true+ is this is an upper triangular matrix.
#
def upper_triangular?
each(:strict_lower).all?(&:zero?)
end
#
# Returns +true+ is this is a matrix with only zero elements
#
def zero?
all?(&:zero?)
end
#--
# OBJECT METHODS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Returns +true+ if and only if the two matrices contain equal elements.
#
def ==(other)
return false unless Matrix === other &&
column_size == other.column_size # necessary for empty matrices
rows == other.rows
end
def eql?(other)
return false unless Matrix === other &&
column_size == other.column_size # necessary for empty matrices
rows.eql? other.rows
end
#
# Returns a clone of the matrix, so that the contents of each do not reference
# identical objects.
# There should be no good reason to do this since Matrices are immutable.
#
def clone
new_matrix @rows.map(&:dup), column_size
end
#
# Returns a hash-code for the matrix.
#
def hash
@rows.hash
end
#--
# ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Matrix multiplication.
# Matrix[[2,4], [6,8]] * Matrix.identity(2)
# => 2 4
# 6 8
#
def *(m) # m is matrix or vector or number
case(m)
when Numeric
rows = @rows.collect {|row|
row.collect {|e| e * m }
}
return new_matrix(rows, column_size)
when Vector
m = self.class.column_vector(m)
r = self * m
return r.column(0)
when Matrix
Matrix.Raise ErrDimensionMismatch if column_size != m.row_size
rows = Array.new(row_size) {|i|
Array.new(m.column_size) {|j|
(0 ... column_size).inject(0) do |vij, k|
vij + self[i, k] * m[k, j]
end
}
}
return new_matrix(rows, m.column_size)
else
return apply_through_coercion(m, __method__)
end
end
#
# Matrix addition.
# Matrix.scalar(2,5) + Matrix[[1,0], [-4,7]]
# => 6 0
# -4 12
#
def +(m)
case m
when Numeric
Matrix.Raise ErrOperationNotDefined, "+", self.class, m.class
when Vector
m = self.class.column_vector(m)
when Matrix
else
return apply_through_coercion(m, __method__)
end
Matrix.Raise ErrDimensionMismatch unless row_size == m.row_size and column_size == m.column_size
rows = Array.new(row_size) {|i|
Array.new(column_size) {|j|
self[i, j] + m[i, j]
}
}
new_matrix rows, column_size
end
#
# Matrix subtraction.
# Matrix[[1,5], [4,2]] - Matrix[[9,3], [-4,1]]
# => -8 2
# 8 1
#
def -(m)
case m
when Numeric
Matrix.Raise ErrOperationNotDefined, "-", self.class, m.class
when Vector
m = self.class.column_vector(m)
when Matrix
else
return apply_through_coercion(m, __method__)
end
Matrix.Raise ErrDimensionMismatch unless row_size == m.row_size and column_size == m.column_size
rows = Array.new(row_size) {|i|
Array.new(column_size) {|j|
self[i, j] - m[i, j]
}
}
new_matrix rows, column_size
end
#
# Matrix division (multiplication by the inverse).
# Matrix[[7,6], [3,9]] / Matrix[[2,9], [3,1]]
# => -7 1
# -3 -6
#
def /(other)
case other
when Numeric
rows = @rows.collect {|row|
row.collect {|e| e / other }
}
return new_matrix(rows, column_size)
when Matrix
return self * other.inverse
else
return apply_through_coercion(other, __method__)
end
end
#
# Returns the inverse of the matrix.
# Matrix[[-1, -1], [0, -1]].inverse
# => -1 1
# 0 -1
#
def inverse
Matrix.Raise ErrDimensionMismatch unless square?
self.class.I(row_size).send(:inverse_from, self)
end
alias inv inverse
def inverse_from(src) # :nodoc:
last = row_size - 1
a = src.to_a
0.upto(last) do |k|
i = k
akk = a[k][k].abs
(k+1).upto(last) do |j|
v = a[j][k].abs
if v > akk
i = j
akk = v
end
end
Matrix.Raise ErrNotRegular if akk == 0
if i != k
a[i], a[k] = a[k], a[i]
@rows[i], @rows[k] = @rows[k], @rows[i]
end
akk = a[k][k]
0.upto(last) do |ii|
next if ii == k
q = a[ii][k].quo(akk)
a[ii][k] = 0
(k + 1).upto(last) do |j|
a[ii][j] -= a[k][j] * q
end
0.upto(last) do |j|
@rows[ii][j] -= @rows[k][j] * q
end
end
(k+1).upto(last) do |j|
a[k][j] = a[k][j].quo(akk)
end
0.upto(last) do |j|
@rows[k][j] = @rows[k][j].quo(akk)
end
end
self
end
private :inverse_from
#
# Matrix exponentiation.
# Equivalent to multiplying the matrix by itself N times.
# Non integer exponents will be handled by diagonalizing the matrix.
#
# Matrix[[7,6], [3,9]] ** 2
# => 67 96
# 48 99
#
def **(other)
case other
when Integer
x = self
if other <= 0
x = self.inverse
return self.class.identity(self.column_size) if other == 0
other = -other
end
z = nil
loop do
z = z ? z * x : x if other[0] == 1
return z if (other >>= 1).zero?
x *= x
end
when Numeric
v, d, v_inv = eigensystem
v * self.class.diagonal(*d.each(:diagonal).map{|e| e ** other}) * v_inv
else
Matrix.Raise ErrOperationNotDefined, "**", self.class, other.class
end
end
#--
# MATRIX FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Returns the determinant of the matrix.
#
# Beware that using Float values can yield erroneous results
# because of their lack of precision.
# Consider using exact types like Rational or BigDecimal instead.
#
# Matrix[[7,6], [3,9]].determinant
# => 45
#
def determinant
Matrix.Raise ErrDimensionMismatch unless square?
m = @rows
case row_size
# Up to 4x4, give result using Laplacian expansion by minors.
# This will typically be faster, as well as giving good results
# in case of Floats
when 0
+1
when 1
+ m[0][0]
when 2
+ m[0][0] * m[1][1] - m[0][1] * m[1][0]
when 3
m0, m1, m2 = m
+ m0[0] * m1[1] * m2[2] - m0[0] * m1[2] * m2[1] \
- m0[1] * m1[0] * m2[2] + m0[1] * m1[2] * m2[0] \
+ m0[2] * m1[0] * m2[1] - m0[2] * m1[1] * m2[0]
when 4
m0, m1, m2, m3 = m
+ m0[0] * m1[1] * m2[2] * m3[3] - m0[0] * m1[1] * m2[3] * m3[2] \
- m0[0] * m1[2] * m2[1] * m3[3] + m0[0] * m1[2] * m2[3] * m3[1] \
+ m0[0] * m1[3] * m2[1] * m3[2] - m0[0] * m1[3] * m2[2] * m3[1] \
- m0[1] * m1[0] * m2[2] * m3[3] + m0[1] * m1[0] * m2[3] * m3[2] \
+ m0[1] * m1[2] * m2[0] * m3[3] - m0[1] * m1[2] * m2[3] * m3[0] \
- m0[1] * m1[3] * m2[0] * m3[2] + m0[1] * m1[3] * m2[2] * m3[0] \
+ m0[2] * m1[0] * m2[1] * m3[3] - m0[2] * m1[0] * m2[3] * m3[1] \
- m0[2] * m1[1] * m2[0] * m3[3] + m0[2] * m1[1] * m2[3] * m3[0] \
+ m0[2] * m1[3] * m2[0] * m3[1] - m0[2] * m1[3] * m2[1] * m3[0] \
- m0[3] * m1[0] * m2[1] * m3[2] + m0[3] * m1[0] * m2[2] * m3[1] \
+ m0[3] * m1[1] * m2[0] * m3[2] - m0[3] * m1[1] * m2[2] * m3[0] \
- m0[3] * m1[2] * m2[0] * m3[1] + m0[3] * m1[2] * m2[1] * m3[0]
else
# For bigger matrices, use an efficient and general algorithm.
# Currently, we use the Gauss-Bareiss algorithm
determinant_bareiss
end
end
alias_method :det, :determinant
#
# Private. Use Matrix#determinant
#
# Returns the determinant of the matrix, using
# Bareiss' multistep integer-preserving gaussian elimination.
# It has the same computational cost order O(n^3) as standard Gaussian elimination.
# Intermediate results are fraction free and of lower complexity.
# A matrix of Integers will have thus intermediate results that are also Integers,
# with smaller bignums (if any), while a matrix of Float will usually have
# intermediate results with better precision.
#
def determinant_bareiss
size = row_size
last = size - 1
a = to_a
no_pivot = Proc.new{ return 0 }
sign = +1
pivot = 1
size.times do |k|
previous_pivot = pivot
if (pivot = a[k][k]) == 0
switch = (k+1 ... size).find(no_pivot) {|row|
a[row][k] != 0
}
a[switch], a[k] = a[k], a[switch]
pivot = a[k][k]
sign = -sign
end
(k+1).upto(last) do |i|
ai = a[i]
(k+1).upto(last) do |j|
ai[j] = (pivot * ai[j] - ai[k] * a[k][j]) / previous_pivot
end
end
end
sign * pivot
end
private :determinant_bareiss
#
# deprecated; use Matrix#determinant
#
def determinant_e
warn "#{caller(1)[0]}: warning: Matrix#determinant_e is deprecated; use #determinant"
rank
end
alias det_e determinant_e
#
# Returns the rank of the matrix.
# Beware that using Float values can yield erroneous results
# because of their lack of precision.
# Consider using exact types like Rational or BigDecimal instead.
#
# Matrix[[7,6], [3,9]].rank
# => 2
#
def rank
# We currently use Bareiss' multistep integer-preserving gaussian elimination
# (see comments on determinant)
a = to_a
last_column = column_size - 1
last_row = row_size - 1
pivot_row = 0
previous_pivot = 1
0.upto(last_column) do |k|
switch_row = (pivot_row .. last_row).find {|row|
a[row][k] != 0
}
if switch_row
a[switch_row], a[pivot_row] = a[pivot_row], a[switch_row] unless pivot_row == switch_row
pivot = a[pivot_row][k]
(pivot_row+1).upto(last_row) do |i|
ai = a[i]
(k+1).upto(last_column) do |j|
ai[j] = (pivot * ai[j] - ai[k] * a[pivot_row][j]) / previous_pivot
end
end
pivot_row += 1
previous_pivot = pivot
end
end
pivot_row
end
#
# deprecated; use Matrix#rank
#
def rank_e
warn "#{caller(1)[0]}: warning: Matrix#rank_e is deprecated; use #rank"
rank
end
# Returns a matrix with entries rounded to the given precision
# (see Float#round)
#
def round(ndigits=0)
map{|e| e.round(ndigits)}
end
#
# Returns the trace (sum of diagonal elements) of the matrix.
# Matrix[[7,6], [3,9]].trace
# => 16
#
def trace
Matrix.Raise ErrDimensionMismatch unless square?
(0...column_size).inject(0) do |tr, i|
tr + @rows[i][i]
end
end
alias tr trace
#
# Returns the transpose of the matrix.
# Matrix[[1,2], [3,4], [5,6]]
# => 1 2
# 3 4
# 5 6
# Matrix[[1,2], [3,4], [5,6]].transpose
# => 1 3 5
# 2 4 6
#
def transpose
return self.class.empty(column_size, 0) if row_size.zero?
new_matrix @rows.transpose, row_size
end
alias t transpose
#--
# DECOMPOSITIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#++
#
# Returns the Eigensystem of the matrix; see +EigenvalueDecomposition+.
# m = Matrix[[1, 2], [3, 4]]
# v, d, v_inv = m.eigensystem
# d.diagonal? # => true
# v.inv == v_inv # => true
# (v * d * v_inv).round(5) == m # => true
#
def eigensystem
EigenvalueDecomposition.new(self)
end
alias eigen eigensystem
#
# Returns the LUP decomposition of the matrix; see +LUPDecomposition+.
# a = Matrix[[1, 2], [3, 4]]
# l, u, p = a.lup
# l.lower_triangular? # => true
# u.upper_triangular? # => true
# p.permutation? # => true
# l * u == a * p # => true
# a.lup.solve([2, 5]) # => Vector[(1/1), (1/2)]
#
def lup
LUPDecomposition.new(self)
end
alias lup_decomposition lup
if 42.respond_to?(:conj)
#--
# COMPLEX ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#++
#
# Returns the conjugate of the matrix.
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
# => 1+2i i 0
# 1 2 3
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].conjugate
# => 1-2i -i 0
# 1 2 3
#
def conjugate
collect(&:conjugate)
end
alias conj conjugate
#
# Returns the imaginary part of the matrix.
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
# => 1+2i i 0
# 1 2 3
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].imaginary
# => 2i i 0
# 0 0 0
#
def imaginary
collect(&:imaginary)
end
alias imag imaginary
#
# Returns the real part of the matrix.
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
# => 1+2i i 0
# 1 2 3
# Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real
# => 1 0 0
# 1 2 3
#
def real
collect(&:real)
end
#
# Returns an array containing matrices corresponding to the real and imaginary
# parts of the matrix
#
# m.rect == [m.real, m.imag] # ==> true for all matrices m
#
def rect
[real, imag]
end
alias rectangular rect
end
#--
# CONVERTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# The coerce method provides support for Ruby type coercion.
# This coercion mechanism is used by Ruby to handle mixed-type
# numeric operations: it is intended to find a compatible common
# type between the two operands of the operator.
# See also Numeric#coerce.
#
def coerce(other)
case other
when Numeric
return Scalar.new(other), self
else
raise TypeError, "#{self.class} can't be coerced into #{other.class}"
end
end
#
# Returns an array of the row vectors of the matrix. See Vector.
#
def row_vectors
Array.new(row_size) {|i|
row(i)
}
end
#
# Returns an array of the column vectors of the matrix. See Vector.
#
def column_vectors
Array.new(column_size) {|i|
column(i)
}
end
#
# Returns an array of arrays that describe the rows of the matrix.
#
def to_a
@rows.collect(&:dup)
end
def elements_to_f
warn "#{caller(1)[0]}: warning: Matrix#elements_to_f is deprecated, use map(&:to_f)"
map(&:to_f)
end
def elements_to_i
warn "#{caller(1)[0]}: warning: Matrix#elements_to_i is deprecated, use map(&:to_i)"
map(&:to_i)
end
def elements_to_r
warn "#{caller(1)[0]}: warning: Matrix#elements_to_r is deprecated, use map(&:to_r)"
map(&:to_r)
end
#--
# PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Overrides Object#to_s
#
def to_s
if empty?
"#{self.class}.empty(#{row_size}, #{column_size})"
else
"#{self.class}[" + @rows.collect{|row|
"[" + row.collect{|e| e.to_s}.join(", ") + "]"
}.join(", ")+"]"
end
end
#
# Overrides Object#inspect
#
def inspect
if empty?
"#{self.class}.empty(#{row_size}, #{column_size})"
else
"#{self.class}#{@rows.inspect}"
end
end
# Private helper modules
module ConversionHelper # :nodoc:
#
# Converts the obj to an Array. If copy is set to true
# a copy of obj will be made if necessary.
#
def convert_to_array(obj, copy = false) # :nodoc:
case obj
when Array
copy ? obj.dup : obj
when Vector
obj.to_a
else
begin
converted = obj.to_ary
rescue Exception => e
raise TypeError, "can't convert #{obj.class} into an Array (#{e.message})"
end
raise TypeError, "#{obj.class}#to_ary should return an Array" unless converted.is_a? Array
converted
end
end
private :convert_to_array
end
extend ConversionHelper
module CoercionHelper # :nodoc:
#
# Applies the operator +oper+ with argument +obj+
# through coercion of +obj+
#
def apply_through_coercion(obj, oper)
coercion = obj.coerce(self)
raise TypeError unless coercion.is_a?(Array) && coercion.length == 2
coercion[0].public_send(oper, coercion[1])
rescue
raise TypeError, "#{obj.inspect} can't be coerced into #{self.class}"
end
private :apply_through_coercion
#
# Helper method to coerce a value into a specific class.
# Raises a TypeError if the coercion fails or the returned value
# is not of the right class.
# (from Rubinius)
#
def self.coerce_to(obj, cls, meth) # :nodoc:
return obj if obj.kind_of?(cls)
begin
ret = obj.__send__(meth)
rescue Exception => e
raise TypeError, "Coercion error: #{obj.inspect}.#{meth} => #{cls} failed:\n" \
"(#{e.message})"
end
raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.kind_of? cls
ret
end
def self.coerce_to_int(obj)
coerce_to(obj, Integer, :to_int)
end
end
include CoercionHelper
# Private CLASS
class Scalar < Numeric # :nodoc:
include ExceptionForMatrix
include CoercionHelper
def initialize(value)
@value = value
end
# ARITHMETIC
def +(other)
case other
when Numeric
Scalar.new(@value + other)
when Vector, Matrix
Scalar.Raise ErrOperationNotDefined, "+", @value.class, other.class
else
apply_through_coercion(other, __method__)
end
end
def -(other)
case other
when Numeric
Scalar.new(@value - other)
when Vector, Matrix
Scalar.Raise ErrOperationNotDefined, "-", @value.class, other.class
else
apply_through_coercion(other, __method__)
end
end
def *(other)
case other
when Numeric
Scalar.new(@value * other)
when Vector, Matrix
other.collect{|e| @value * e}
else
apply_through_coercion(other, __method__)
end
end
def /(other)
case other
when Numeric
Scalar.new(@value / other)
when Vector
Scalar.Raise ErrOperationNotDefined, "/", @value.class, other.class
when Matrix
self * other.inverse
else
apply_through_coercion(other, __method__)
end
end
def **(other)
case other
when Numeric
Scalar.new(@value ** other)
when Vector
Scalar.Raise ErrOperationNotDefined, "**", @value.class, other.class
when Matrix
#other.powered_by(self)
Scalar.Raise ErrOperationNotImplemented, "**", @value.class, other.class
else
apply_through_coercion(other, __method__)
end
end
end
end
#
# The +Vector+ class represents a mathematical vector, which is useful in its own right, and
# also constitutes a row or column of a Matrix.
#
# == Method Catalogue
#
# To create a Vector:
# * Vector.[](*array)
# * Vector.elements(array, copy = true)
#
# To access elements:
# * #[](i)
#
# To enumerate the elements:
# * #each2(v)
# * #collect2(v)
#
# Vector arithmetic:
# * #*(x) "is matrix or number"
# * #+(v)
# * #-(v)
#
# Vector functions:
# * #inner_product(v)
# * #collect
# * #magnitude
# * #map
# * #map2(v)
# * #norm
# * #normalize
# * #r
# * #size
#
# Conversion to other data types:
# * #covector
# * #to_a
# * #coerce(other)
#
# String representations:
# * #to_s
# * #inspect
#
class Vector
include ExceptionForMatrix
include Enumerable
include Matrix::CoercionHelper
extend Matrix::ConversionHelper
#INSTANCE CREATION
private_class_method :new
attr_reader :elements
protected :elements
#
# Creates a Vector from a list of elements.
# Vector[7, 4, ...]
#
def Vector.[](*array)
new convert_to_array(array, false)
end
#
# Creates a vector from an Array. The optional second argument specifies
# whether the array itself or a copy is used internally.
#
def Vector.elements(array, copy = true)
new convert_to_array(array, copy)
end
#
# Vector.new is private; use Vector[] or Vector.elements to create.
#
def initialize(array)
# No checking is done at this point.
@elements = array
end
# ACCESSING
#
# Returns element number +i+ (starting at zero) of the vector.
#
def [](i)
@elements[i]
end
alias element []
alias component []
def []=(i, v)
@elements[i]= v
end
alias set_element []=
alias set_component []=
private :[]=, :set_element, :set_component
#
# Returns the number of elements in the vector.
#
def size
@elements.size
end
#--
# ENUMERATIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Iterate over the elements of this vector
#
def each(&block)
return to_enum(:each) unless block_given?
@elements.each(&block)
self
end
#
# Iterate over the elements of this vector and +v+ in conjunction.
#
def each2(v) # :yield: e1, e2
raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
Vector.Raise ErrDimensionMismatch if size != v.size
return to_enum(:each2, v) unless block_given?
size.times do |i|
yield @elements[i], v[i]
end
self
end
#
# Collects (as in Enumerable#collect) over the elements of this vector and +v+
# in conjunction.
#
def collect2(v) # :yield: e1, e2
raise TypeError, "Integer is not like Vector" if v.kind_of?(Integer)
Vector.Raise ErrDimensionMismatch if size != v.size
return to_enum(:collect2, v) unless block_given?
Array.new(size) do |i|
yield @elements[i], v[i]
end
end
#--
# COMPARING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Returns +true+ iff the two vectors have the same elements in the same order.
#
def ==(other)
return false unless Vector === other
@elements == other.elements
end
def eql?(other)
return false unless Vector === other
@elements.eql? other.elements
end
#
# Return a copy of the vector.
#
def clone
self.class.elements(@elements)
end
#
# Return a hash-code for the vector.
#
def hash
@elements.hash
end
#--
# ARITHMETIC -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Multiplies the vector by +x+, where +x+ is a number or another vector.
#
def *(x)
case x
when Numeric
els = @elements.collect{|e| e * x}
self.class.elements(els, false)
when Matrix
Matrix.column_vector(self) * x
when Vector
Vector.Raise ErrOperationNotDefined, "*", self.class, x.class
else
apply_through_coercion(x, __method__)
end
end
#
# Vector addition.
#
def +(v)
case v
when Vector
Vector.Raise ErrDimensionMismatch if size != v.size
els = collect2(v) {|v1, v2|
v1 + v2
}
self.class.elements(els, false)
when Matrix
Matrix.column_vector(self) + v
else
apply_through_coercion(v, __method__)
end
end
#
# Vector subtraction.
#
def -(v)
case v
when Vector
Vector.Raise ErrDimensionMismatch if size != v.size
els = collect2(v) {|v1, v2|
v1 - v2
}
self.class.elements(els, false)
when Matrix
Matrix.column_vector(self) - v
else
apply_through_coercion(v, __method__)
end
end
#
# Vector division.
#
def /(x)
case x
when Numeric
els = @elements.collect{|e| e / x}
self.class.elements(els, false)
when Matrix, Vector
Vector.Raise ErrOperationNotDefined, "/", self.class, x.class
else
apply_through_coercion(x, __method__)
end
end
#--
# VECTOR FUNCTIONS -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Returns the inner product of this vector with the other.
# Vector[4,7].inner_product Vector[10,1] => 47
#
def inner_product(v)
Vector.Raise ErrDimensionMismatch if size != v.size
p = 0
each2(v) {|v1, v2|
p += v1 * v2
}
p
end
#
# Like Array#collect.
#
def collect(&block) # :yield: e
return to_enum(:collect) unless block_given?
els = @elements.collect(&block)
self.class.elements(els, false)
end
alias map collect
#
# Returns the modulus (Pythagorean distance) of the vector.
# Vector[5,8,2].r => 9.643650761
#
def magnitude
Math.sqrt(@elements.inject(0) {|v, e| v + e*e})
end
alias r magnitude
alias norm magnitude
#
# Like Vector#collect2, but returns a Vector instead of an Array.
#
def map2(v, &block) # :yield: e1, e2
return to_enum(:map2, v) unless block_given?
els = collect2(v, &block)
self.class.elements(els, false)
end
class ZeroVectorError < StandardError
end
#
# Returns a new vector with the same direction but with norm 1.
# v = Vector[5,8,2].normalize
# # => Vector[0.5184758473652127, 0.8295613557843402, 0.20739033894608505]
# v.norm => 1.0
#
def normalize
n = magnitude
raise ZeroVectorError, "Zero vectors can not be normalized" if n == 0
self / n
end
#--
# CONVERTING
#++
#
# Creates a single-row matrix from this vector.
#
def covector
Matrix.row_vector(self)
end
#
# Returns the elements of the vector in an array.
#
def to_a
@elements.dup
end
def elements_to_f
warn "#{caller(1)[0]}: warning: Vector#elements_to_f is deprecated"
map(&:to_f)
end
def elements_to_i
warn "#{caller(1)[0]}: warning: Vector#elements_to_i is deprecated"
map(&:to_i)
end
def elements_to_r
warn "#{caller(1)[0]}: warning: Vector#elements_to_r is deprecated"
map(&:to_r)
end
#
# The coerce method provides support for Ruby type coercion.
# This coercion mechanism is used by Ruby to handle mixed-type
# numeric operations: it is intended to find a compatible common
# type between the two operands of the operator.
# See also Numeric#coerce.
#
def coerce(other)
case other
when Numeric
return Matrix::Scalar.new(other), self
else
raise TypeError, "#{self.class} can't be coerced into #{other.class}"
end
end
#--
# PRINTING -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#++
#
# Overrides Object#to_s
#
def to_s
"Vector[" + @elements.join(", ") + "]"
end
#
# Overrides Object#inspect
#
def inspect
"Vector" + @elements.inspect
end
end
end
backports-3.16.0/lib/backports/1.9.2/stdlib/matrix/ 0000775 0000000 0000000 00000000000 13617065163 0021573 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.2/stdlib/matrix/eigenvalue_decomposition.rb 0000664 0000000 0000000 00000053364 13617065163 0027213 0 ustar 00root root 0000000 0000000 class Matrix
# Adapted from JAMA: http://math.nist.gov/javanumerics/jama/
# Eigenvalues and eigenvectors of a real matrix.
#
# Computes the eigenvalues and eigenvectors of a matrix A.
#
# If A is diagonalizable, this provides matrices V and D
# such that A = V*D*V.inv, where D is the diagonal matrix with entries
# equal to the eigenvalues and V is formed by the eigenvectors.
#
# If A is symmetric, then V is orthogonal and thus A = V*D*V.t
class EigenvalueDecomposition
# Constructs the eigenvalue decomposition for a square matrix +A+
#
def initialize(a)
# @d, @e: Arrays for internal storage of eigenvalues.
# @v: Array for internal storage of eigenvectors.
# @h: Array for internal storage of nonsymmetric Hessenberg form.
raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix)
@size = a.row_size
@d = Array.new(@size, 0)
@e = Array.new(@size, 0)
if (@symmetric = a.symmetric?)
@v = a.to_a
tridiagonalize
diagonalize
else
@v = Array.new(@size) { Array.new(@size, 0) }
@h = a.to_a
@ort = Array.new(@size, 0)
reduce_to_hessenberg
hessenberg_to_real_schur
end
end
# Returns the eigenvector matrix +V+
#
def eigenvector_matrix
Matrix.send :new, build_eigenvectors.transpose
end
alias v eigenvector_matrix
# Returns the inverse of the eigenvector matrix +V+
#
def eigenvector_matrix_inv
r = Matrix.send :new, build_eigenvectors
r = r.transpose.inverse unless @symmetric
r
end
alias v_inv eigenvector_matrix_inv
# Returns the eigenvalues in an array
#
def eigenvalues
values = @d.dup
@e.each_with_index{|imag, i| values[i] = Complex(values[i], imag) unless imag == 0}
values
end
# Returns an array of the eigenvectors
#
def eigenvectors
build_eigenvectors.map{|ev| Vector.send :new, ev}
end
# Returns the block diagonal eigenvalue matrix +D+
#
def eigenvalue_matrix
Matrix.diagonal(*eigenvalues)
end
alias d eigenvalue_matrix
# Returns [eigenvector_matrix, eigenvalue_matrix, eigenvector_matrix_inv]
#
def to_ary
[v, d, v_inv]
end
alias_method :to_a, :to_ary
private
def build_eigenvectors
# JAMA stores complex eigenvectors in a strange way
# See http://cio.nist.gov/esd/emaildir/lists/jama/msg01021.html
@e.each_with_index.map do |imag, i|
if imag == 0
Array.new(@size){|j| @v[j][i]}
elsif imag > 0
Array.new(@size){|j| Complex(@v[j][i], @v[j][i+1])}
else
Array.new(@size){|j| Complex(@v[j][i], -@v[j][i-1])}
end
end
end
# Complex scalar division.
def cdiv(xr, xi, yr, yi)
if (yr.abs > yi.abs)
r = yi/yr
d = yr + r*yi
[(xr + r*xi)/d, (xi - r*xr)/d]
else
r = yr/yi
d = yi + r*yr
[(r*xr + xi)/d, (r*xi - xr)/d]
end
end
# Symmetric Householder reduction to tridiagonal form.
def tridiagonalize
# This is derived from the Algol procedures tred2 by
# Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
# Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
# Fortran subroutine in EISPACK.
@size.times do |j|
@d[j] = @v[@size-1][j]
end
# Householder reduction to tridiagonal form.
(@size-1).downto(0+1) do |i|
# Scale to avoid under/overflow.
scale = 0.0
h = 0.0
i.times do |k|
scale = scale + @d[k].abs
end
if (scale == 0.0)
@e[i] = @d[i-1]
i.times do |j|
@d[j] = @v[i-1][j]
@v[i][j] = 0.0
@v[j][i] = 0.0
end
else
# Generate Householder vector.
i.times do |k|
@d[k] /= scale
h += @d[k] * @d[k]
end
f = @d[i-1]
g = Math.sqrt(h)
if (f > 0)
g = -g
end
@e[i] = scale * g
h -= f * g
@d[i-1] = f - g
i.times do |j|
@e[j] = 0.0
end
# Apply similarity transformation to remaining columns.
i.times do |j|
f = @d[j]
@v[j][i] = f
g = @e[j] + @v[j][j] * f
(j+1).upto(i-1) do |k|
g += @v[k][j] * @d[k]
@e[k] += @v[k][j] * f
end
@e[j] = g
end
f = 0.0
i.times do |j|
@e[j] /= h
f += @e[j] * @d[j]
end
hh = f / (h + h)
i.times do |j|
@e[j] -= hh * @d[j]
end
i.times do |j|
f = @d[j]
g = @e[j]
j.upto(i-1) do |k|
@v[k][j] -= (f * @e[k] + g * @d[k])
end
@d[j] = @v[i-1][j]
@v[i][j] = 0.0
end
end
@d[i] = h
end
# Accumulate transformations.
0.upto(@size-1-1) do |i|
@v[@size-1][i] = @v[i][i]
@v[i][i] = 1.0
h = @d[i+1]
if (h != 0.0)
0.upto(i) do |k|
@d[k] = @v[k][i+1] / h
end
0.upto(i) do |j|
g = 0.0
0.upto(i) do |k|
g += @v[k][i+1] * @v[k][j]
end
0.upto(i) do |k|
@v[k][j] -= g * @d[k]
end
end
end
0.upto(i) do |k|
@v[k][i+1] = 0.0
end
end
@size.times do |j|
@d[j] = @v[@size-1][j]
@v[@size-1][j] = 0.0
end
@v[@size-1][@size-1] = 1.0
@e[0] = 0.0
end
# Symmetric tridiagonal QL algorithm.
def diagonalize
# This is derived from the Algol procedures tql2, by
# Bowdler, Martin, Reinsch, and Wilkinson, Handbook for
# Auto. Comp., Vol.ii-Linear Algebra, and the corresponding
# Fortran subroutine in EISPACK.
1.upto(@size-1) do |i|
@e[i-1] = @e[i]
end
@e[@size-1] = 0.0
f = 0.0
tst1 = 0.0
eps = Float::EPSILON
@size.times do |l|
# Find small subdiagonal element
tst1 = [tst1, @d[l].abs + @e[l].abs].max
m = l
while (m < @size) do
if (@e[m].abs <= eps*tst1)
break
end
m+=1
end
# If m == l, @d[l] is an eigenvalue,
# otherwise, iterate.
if (m > l)
iter = 0
begin
iter = iter + 1 # (Could check iteration count here.)
# Compute implicit shift
g = @d[l]
p = (@d[l+1] - g) / (2.0 * @e[l])
r = Math.hypot(p, 1.0)
if (p < 0)
r = -r
end
@d[l] = @e[l] / (p + r)
@d[l+1] = @e[l] * (p + r)
dl1 = @d[l+1]
h = g - @d[l]
(l+2).upto(@size-1) do |i|
@d[i] -= h
end
f += h
# Implicit QL transformation.
p = @d[m]
c = 1.0
c2 = c
c3 = c
el1 = @e[l+1]
s = 0.0
s2 = 0.0
(m-1).downto(l) do |i|
c3 = c2
c2 = c
s2 = s
g = c * @e[i]
h = c * p
r = Math.hypot(p, @e[i])
@e[i+1] = s * r
s = @e[i] / r
c = p / r
p = c * @d[i] - s * g
@d[i+1] = h + s * (c * g + s * @d[i])
# Accumulate transformation.
@size.times do |k|
h = @v[k][i+1]
@v[k][i+1] = s * @v[k][i] + c * h
@v[k][i] = c * @v[k][i] - s * h
end
end
p = -s * s2 * c3 * el1 * @e[l] / dl1
@e[l] = s * p
@d[l] = c * p
# Check for convergence.
end while (@e[l].abs > eps*tst1)
end
@d[l] = @d[l] + f
@e[l] = 0.0
end
# Sort eigenvalues and corresponding vectors.
0.upto(@size-2) do |i|
k = i
p = @d[i]
(i+1).upto(@size-1) do |j|
if (@d[j] < p)
k = j
p = @d[j]
end
end
if (k != i)
@d[k] = @d[i]
@d[i] = p
@size.times do |j|
p = @v[j][i]
@v[j][i] = @v[j][k]
@v[j][k] = p
end
end
end
end
# Nonsymmetric reduction to Hessenberg form.
def reduce_to_hessenberg
# This is derived from the Algol procedures orthes and ortran,
# by Martin and Wilkinson, Handbook for Auto. Comp.,
# Vol.ii-Linear Algebra, and the corresponding
# Fortran subroutines in EISPACK.
low = 0
high = @size-1
(low+1).upto(high-1) do |m|
# Scale column.
scale = 0.0
m.upto(high) do |i|
scale = scale + @h[i][m-1].abs
end
if (scale != 0.0)
# Compute Householder transformation.
h = 0.0
high.downto(m) do |i|
@ort[i] = @h[i][m-1]/scale
h += @ort[i] * @ort[i]
end
g = Math.sqrt(h)
if (@ort[m] > 0)
g = -g
end
h -= @ort[m] * g
@ort[m] = @ort[m] - g
# Apply Householder similarity transformation
# @h = (I-u*u'/h)*@h*(I-u*u')/h)
m.upto(@size-1) do |j|
f = 0.0
high.downto(m) do |i|
f += @ort[i]*@h[i][j]
end
f = f/h
m.upto(high) do |i|
@h[i][j] -= f*@ort[i]
end
end
0.upto(high) do |i|
f = 0.0
high.downto(m) do |j|
f += @ort[j]*@h[i][j]
end
f = f/h
m.upto(high) do |j|
@h[i][j] -= f*@ort[j]
end
end
@ort[m] = scale*@ort[m]
@h[m][m-1] = scale*g
end
end
# Accumulate transformations (Algol's ortran).
@size.times do |i|
@size.times do |j|
@v[i][j] = (i == j ? 1.0 : 0.0)
end
end
(high-1).downto(low+1) do |m|
if (@h[m][m-1] != 0.0)
(m+1).upto(high) do |i|
@ort[i] = @h[i][m-1]
end
m.upto(high) do |j|
g = 0.0
m.upto(high) do |i|
g += @ort[i] * @v[i][j]
end
# Double division avoids possible underflow
g = (g / @ort[m]) / @h[m][m-1]
m.upto(high) do |i|
@v[i][j] += g * @ort[i]
end
end
end
end
end
# Nonsymmetric reduction from Hessenberg to real Schur form.
def hessenberg_to_real_schur
# This is derived from the Algol procedure hqr2,
# by Martin and Wilkinson, Handbook for Auto. Comp.,
# Vol.ii-Linear Algebra, and the corresponding
# Fortran subroutine in EISPACK.
# Initialize
nn = @size
n = nn-1
low = 0
high = nn-1
eps = Float::EPSILON
exshift = 0.0
p=q=r=s=z=0
# Store roots isolated by balanc and compute matrix norm
norm = 0.0
nn.times do |i|
if (i < low || i > high)
@d[i] = @h[i][i]
@e[i] = 0.0
end
([i-1, 0].max).upto(nn-1) do |j|
norm = norm + @h[i][j].abs
end
end
# Outer loop over eigenvalue index
iter = 0
while (n >= low) do
# Look for single small sub-diagonal element
l = n
while (l > low) do
s = @h[l-1][l-1].abs + @h[l][l].abs
if (s == 0.0)
s = norm
end
if (@h[l][l-1].abs < eps * s)
break
end
l-=1
end
# Check for convergence
# One root found
if (l == n)
@h[n][n] = @h[n][n] + exshift
@d[n] = @h[n][n]
@e[n] = 0.0
n-=1
iter = 0
# Two roots found
elsif (l == n-1)
w = @h[n][n-1] * @h[n-1][n]
p = (@h[n-1][n-1] - @h[n][n]) / 2.0
q = p * p + w
z = Math.sqrt(q.abs)
@h[n][n] = @h[n][n] + exshift
@h[n-1][n-1] = @h[n-1][n-1] + exshift
x = @h[n][n]
# Real pair
if (q >= 0)
if (p >= 0)
z = p + z
else
z = p - z
end
@d[n-1] = x + z
@d[n] = @d[n-1]
if (z != 0.0)
@d[n] = x - w / z
end
@e[n-1] = 0.0
@e[n] = 0.0
x = @h[n][n-1]
s = x.abs + z.abs
p = x / s
q = z / s
r = Math.sqrt(p * p+q * q)
p /= r
q /= r
# Row modification
(n-1).upto(nn-1) do |j|
z = @h[n-1][j]
@h[n-1][j] = q * z + p * @h[n][j]
@h[n][j] = q * @h[n][j] - p * z
end
# Column modification
0.upto(n) do |i|
z = @h[i][n-1]
@h[i][n-1] = q * z + p * @h[i][n]
@h[i][n] = q * @h[i][n] - p * z
end
# Accumulate transformations
low.upto(high) do |i|
z = @v[i][n-1]
@v[i][n-1] = q * z + p * @v[i][n]
@v[i][n] = q * @v[i][n] - p * z
end
# Complex pair
else
@d[n-1] = x + p
@d[n] = x + p
@e[n-1] = z
@e[n] = -z
end
n -= 2
iter = 0
# No convergence yet
else
# Form shift
x = @h[n][n]
y = 0.0
w = 0.0
if (l < n)
y = @h[n-1][n-1]
w = @h[n][n-1] * @h[n-1][n]
end
# Wilkinson's original ad hoc shift
if (iter == 10)
exshift += x
low.upto(n) do |i|
@h[i][i] -= x
end
s = @h[n][n-1].abs + @h[n-1][n-2].abs
x = y = 0.75 * s
w = -0.4375 * s * s
end
# MATLAB's new ad hoc shift
if (iter == 30)
s = (y - x) / 2.0
s *= s + w
if (s > 0)
s = Math.sqrt(s)
if (y < x)
s = -s
end
s = x - w / ((y - x) / 2.0 + s)
low.upto(n) do |i|
@h[i][i] -= s
end
exshift += s
x = y = w = 0.964
end
end
iter = iter + 1 # (Could check iteration count here.)
# Look for two consecutive small sub-diagonal elements
m = n-2
while (m >= l) do
z = @h[m][m]
r = x - z
s = y - z
p = (r * s - w) / @h[m+1][m] + @h[m][m+1]
q = @h[m+1][m+1] - z - r - s
r = @h[m+2][m+1]
s = p.abs + q.abs + r.abs
p /= s
q /= s
r /= s
if (m == l)
break
end
if (@h[m][m-1].abs * (q.abs + r.abs) <
eps * (p.abs * (@h[m-1][m-1].abs + z.abs +
@h[m+1][m+1].abs)))
break
end
m-=1
end
(m+2).upto(n) do |i|
@h[i][i-2] = 0.0
if (i > m+2)
@h[i][i-3] = 0.0
end
end
# Double QR step involving rows l:n and columns m:n
m.upto(n-1) do |k|
notlast = (k != n-1)
if (k != m)
p = @h[k][k-1]
q = @h[k+1][k-1]
r = (notlast ? @h[k+2][k-1] : 0.0)
x = p.abs + q.abs + r.abs
if (x != 0.0)
p /= x
q /= x
r /= x
end
end
if (x == 0.0)
break
end
s = Math.sqrt(p * p + q * q + r * r)
if (p < 0)
s = -s
end
if (s != 0)
if (k != m)
@h[k][k-1] = -s * x
elsif (l != m)
@h[k][k-1] = -@h[k][k-1]
end
p += s
x = p / s
y = q / s
z = r / s
q /= p
r /= p
# Row modification
k.upto(nn-1) do |j|
p = @h[k][j] + q * @h[k+1][j]
if (notlast)
p += r * @h[k+2][j]
@h[k+2][j] = @h[k+2][j] - p * z
end
@h[k][j] = @h[k][j] - p * x
@h[k+1][j] = @h[k+1][j] - p * y
end
# Column modification
0.upto([n, k+3].min) do |i|
p = x * @h[i][k] + y * @h[i][k+1]
if (notlast)
p += z * @h[i][k+2]
@h[i][k+2] = @h[i][k+2] - p * r
end
@h[i][k] = @h[i][k] - p
@h[i][k+1] = @h[i][k+1] - p * q
end
# Accumulate transformations
low.upto(high) do |i|
p = x * @v[i][k] + y * @v[i][k+1]
if (notlast)
p += z * @v[i][k+2]
@v[i][k+2] = @v[i][k+2] - p * r
end
@v[i][k] = @v[i][k] - p
@v[i][k+1] = @v[i][k+1] - p * q
end
end # (s != 0)
end # k loop
end # check convergence
end # while (n >= low)
# Backsubstitute to find vectors of upper triangular form
if (norm == 0.0)
return
end
(nn-1).downto(0) do |n|
p = @d[n]
q = @e[n]
# Real vector
if (q == 0)
l = n
@h[n][n] = 1.0
(n-1).downto(0) do |i|
w = @h[i][i] - p
r = 0.0
l.upto(n) do |j|
r += @h[i][j] * @h[j][n]
end
if (@e[i] < 0.0)
z = w
s = r
else
l = i
if (@e[i] == 0.0)
if (w != 0.0)
@h[i][n] = -r / w
else
@h[i][n] = -r / (eps * norm)
end
# Solve real equations
else
x = @h[i][i+1]
y = @h[i+1][i]
q = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i]
t = (x * s - z * r) / q
@h[i][n] = t
if (x.abs > z.abs)
@h[i+1][n] = (-r - w * t) / x
else
@h[i+1][n] = (-s - y * t) / z
end
end
# Overflow control
t = @h[i][n].abs
if ((eps * t) * t > 1)
i.upto(n) do |j|
@h[j][n] = @h[j][n] / t
end
end
end
end
# Complex vector
elsif (q < 0)
l = n-1
# Last vector component imaginary so matrix is triangular
if (@h[n][n-1].abs > @h[n-1][n].abs)
@h[n-1][n-1] = q / @h[n][n-1]
@h[n-1][n] = -(@h[n][n] - p) / @h[n][n-1]
else
cdivr, cdivi = cdiv(0.0, -@h[n-1][n], @h[n-1][n-1]-p, q)
@h[n-1][n-1] = cdivr
@h[n-1][n] = cdivi
end
@h[n][n-1] = 0.0
@h[n][n] = 1.0
(n-2).downto(0) do |i|
ra = 0.0
sa = 0.0
l.upto(n) do |j|
ra = ra + @h[i][j] * @h[j][n-1]
sa = sa + @h[i][j] * @h[j][n]
end
w = @h[i][i] - p
if (@e[i] < 0.0)
z = w
r = ra
s = sa
else
l = i
if (@e[i] == 0)
cdivr, cdivi = cdiv(-ra, -sa, w, q)
@h[i][n-1] = cdivr
@h[i][n] = cdivi
else
# Solve complex equations
x = @h[i][i+1]
y = @h[i+1][i]
vr = (@d[i] - p) * (@d[i] - p) + @e[i] * @e[i] - q * q
vi = (@d[i] - p) * 2.0 * q
if (vr == 0.0 && vi == 0.0)
vr = eps * norm * (w.abs + q.abs +
x.abs + y.abs + z.abs)
end
cdivr, cdivi = cdiv(x*r-z*ra+q*sa, x*s-z*sa-q*ra, vr, vi)
@h[i][n-1] = cdivr
@h[i][n] = cdivi
if (x.abs > (z.abs + q.abs))
@h[i+1][n-1] = (-ra - w * @h[i][n-1] + q * @h[i][n]) / x
@h[i+1][n] = (-sa - w * @h[i][n] - q * @h[i][n-1]) / x
else
cdivr, cdivi = cdiv(-r-y*@h[i][n-1], -s-y*@h[i][n], z, q)
@h[i+1][n-1] = cdivr
@h[i+1][n] = cdivi
end
end
# Overflow control
t = [@h[i][n-1].abs, @h[i][n].abs].max
if ((eps * t) * t > 1)
i.upto(n) do |j|
@h[j][n-1] = @h[j][n-1] / t
@h[j][n] = @h[j][n] / t
end
end
end
end
end
end
# Vectors of isolated roots
nn.times do |i|
if (i < low || i > high)
i.upto(nn-1) do |j|
@v[i][j] = @h[i][j]
end
end
end
# Back transformation to get eigenvectors of original matrix
(nn-1).downto(low) do |j|
low.upto(high) do |i|
z = 0.0
low.upto([j, high].min) do |k|
z += @v[i][k] * @h[k][j]
end
@v[i][j] = z
end
end
end
end
end
backports-3.16.0/lib/backports/1.9.2/stdlib/matrix/lup_decomposition.rb 0000664 0000000 0000000 00000012432 13617065163 0025656 0 ustar 00root root 0000000 0000000 class Matrix
# Adapted from JAMA: http://math.nist.gov/javanumerics/jama/
#
# For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n
# unit lower triangular matrix L, an n-by-n upper triangular matrix U,
# and a m-by-m permutation matrix P so that L*U = P*A.
# If m < n, then L is m-by-m and U is m-by-n.
#
# The LUP decomposition with pivoting always exists, even if the matrix is
# singular, so the constructor will never fail. The primary use of the
# LU decomposition is in the solution of square systems of simultaneous
# linear equations. This will fail if singular? returns true.
#
class LUPDecomposition
# Returns the lower triangular factor +L+
include Matrix::ConversionHelper
def l
Matrix.build(@row_size, @col_size) do |i, j|
if (i > j)
@lu[i][j]
elsif (i == j)
1
else
0
end
end
end
# Returns the upper triangular factor +U+
def u
Matrix.build(@col_size, @col_size) do |i, j|
if (i <= j)
@lu[i][j]
else
0
end
end
end
# Returns the permutation matrix +P+
def p
rows = Array.new(@row_size){Array.new(@col_size, 0)}
@pivots.each_with_index{|p, i| rows[i][p] = 1}
Matrix.send :new, rows, @col_size
end
# Returns +L+, +U+, +P+ in an array
def to_ary
[l, u, p]
end
alias_method :to_a, :to_ary
# Returns the pivoting indices
attr_reader :pivots
# Returns +true+ if +U+, and hence +A+, is singular.
def singular? ()
@col_size.times do |j|
if (@lu[j][j] == 0)
return true
end
end
false
end
# Returns the determinant of +A+, calculated efficiently
# from the factorization.
def det
if (@row_size != @col_size)
Matrix.Raise Matrix::ErrDimensionMismatch unless square?
end
d = @pivot_sign
@col_size.times do |j|
d *= @lu[j][j]
end
d
end
alias_method :determinant, :det
# Returns +m+ so that A*m = b,
# or equivalently so that L*U*m = P*b
# +b+ can be a Matrix or a Vector
def solve b
if (singular?)
Matrix.Raise Matrix::ErrNotRegular, "Matrix is singular."
end
if b.is_a? Matrix
if (b.row_size != @row_size)
Matrix.Raise Matrix::ErrDimensionMismatch
end
# Copy right hand side with pivoting
nx = b.column_size
m = @pivots.map{|row| b.row(row).to_a}
# Solve L*Y = P*b
@col_size.times do |k|
(k+1).upto(@col_size-1) do |i|
nx.times do |j|
m[i][j] -= m[k][j]*@lu[i][k]
end
end
end
# Solve U*m = Y
(@col_size-1).downto(0) do |k|
nx.times do |j|
m[k][j] = m[k][j].quo(@lu[k][k])
end
k.times do |i|
nx.times do |j|
m[i][j] -= m[k][j]*@lu[i][k]
end
end
end
Matrix.send :new, m, nx
else # same algorithm, specialized for simpler case of a vector
b = convert_to_array(b)
if (b.size != @row_size)
Matrix.Raise Matrix::ErrDimensionMismatch
end
# Copy right hand side with pivoting
m = b.values_at(*@pivots)
# Solve L*Y = P*b
@col_size.times do |k|
(k+1).upto(@col_size-1) do |i|
m[i] -= m[k]*@lu[i][k]
end
end
# Solve U*m = Y
(@col_size-1).downto(0) do |k|
m[k] = m[k].quo(@lu[k][k])
k.times do |i|
m[i] -= m[k]*@lu[i][k]
end
end
Vector.elements(m, false)
end
end
def initialize a
raise TypeError, "Expected Matrix but got #{a.class}" unless a.is_a?(Matrix)
# Use a "left-looking", dot-product, Crout/Doolittle algorithm.
@lu = a.to_a
@row_size = a.row_size
@col_size = a.column_size
@pivots = Array.new(@row_size)
@row_size.times do |i|
@pivots[i] = i
end
@pivot_sign = 1
lu_col_j = Array.new(@row_size)
# Outer loop.
@col_size.times do |j|
# Make a copy of the j-th column to localize references.
@row_size.times do |i|
lu_col_j[i] = @lu[i][j]
end
# Apply previous transformations.
@row_size.times do |i|
lu_row_i = @lu[i]
# Most of the time is spent in the following dot product.
kmax = [i, j].min
s = 0
kmax.times do |k|
s += lu_row_i[k]*lu_col_j[k]
end
lu_row_i[j] = lu_col_j[i] -= s
end
# Find pivot and exchange if necessary.
p = j
(j+1).upto(@row_size-1) do |i|
if (lu_col_j[i].abs > lu_col_j[p].abs)
p = i
end
end
if (p != j)
@col_size.times do |k|
t = @lu[p][k]; @lu[p][k] = @lu[j][k]; @lu[j][k] = t
end
k = @pivots[p]; @pivots[p] = @pivots[j]; @pivots[j] = k
@pivot_sign = -@pivot_sign
end
# Compute multipliers.
if (j < @row_size && @lu[j][j] != 0)
(j+1).upto(@row_size-1) do |i|
@lu[i][j] = @lu[i][j].quo(@lu[j][j])
end
end
end
end
end
end
backports-3.16.0/lib/backports/1.9.2/stdlib/set.rb 0000664 0000000 0000000 00000000525 13617065163 0021411 0 ustar 00root root 0000000 0000000 class Set
def delete_if
block_given? or return enum_for(__method__)
to_a.each { |o| @hash.delete(o) if yield(o) }
self
end unless method_defined? :delete_if
def keep_if
block_given? or return enum_for(__method__)
to_a.each { |o| @hash.delete(o) unless yield(o) }
self
end unless method_defined? :keep_if
end
backports-3.16.0/lib/backports/1.9.3.rb 0000664 0000000 0000000 00000000170 13617065163 0017332 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 1.9.3
require 'backports/1.9.2'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.3/ 0000775 0000000 0000000 00000000000 13617065163 0017007 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.3/file.rb 0000664 0000000 0000000 00000000117 13617065163 0020252 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.3/file/ 0000775 0000000 0000000 00000000000 13617065163 0017726 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.3/file/null.rb 0000664 0000000 0000000 00000000612 13617065163 0021224 0 ustar 00root root 0000000 0000000 unless File.const_defined? :NULL
module File::Constants
platform = RUBY_PLATFORM
platform = RbConfig::CONFIG['host_os'] if platform == 'java'
NULL = case platform
when /mswin|mingw/i
'NUL'
when /amiga/i
'NIL:'
when /openvms/i
'NL:'
else
'/dev/null'
end
end
end
backports-3.16.0/lib/backports/1.9.3/io.rb 0000664 0000000 0000000 00000000117 13617065163 0017742 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.3/io/ 0000775 0000000 0000000 00000000000 13617065163 0017416 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.3/io/advise.rb 0000664 0000000 0000000 00000001167 13617065163 0021223 0 ustar 00root root 0000000 0000000 unless IO.method_defined? :advise
require 'backports/tools/arguments'
class IO
def advise(advice, offset=0, len=0)
raise RangeError if Backports.coerce_to_int(offset) >= 1<<31
raise RangeError if Backports.coerce_to_int(len) >= 1<<31
raise IOError if closed?
case advice
when :normal,
:sequential,
:random,
:willneed,
:dontneed,
:noreuse
return nil
when Symbol
raise NotImplementedError, "Unsupported advice #{advice}"
else
raise TypeError, "advice must be a Symbol"
end
end
end
end
backports-3.16.0/lib/backports/1.9.3/io/binwrite.rb 0000664 0000000 0000000 00000000321 13617065163 0021562 0 ustar 00root root 0000000 0000000 unless IO.respond_to? :binwrite
require 'backports/tools/io'
def IO.binwrite(name, string, offset = nil, options = Backports::Undefined)
Backports.write(true, name, string, offset, options)
end
end
backports-3.16.0/lib/backports/1.9.3/io/write.rb 0000664 0000000 0000000 00000000314 13617065163 0021073 0 ustar 00root root 0000000 0000000 unless IO.respond_to? :write
require 'backports/tools/io'
def IO.write(name, string, offset = nil, options = Backports::Undefined)
Backports.write(false, name, string, offset, options)
end
end
backports-3.16.0/lib/backports/1.9.3/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020641 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/1.9.3/string/ 0000775 0000000 0000000 00000000000 13617065163 0020315 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/1.9.3/string/byteslice.rb 0000664 0000000 0000000 00000002265 13617065163 0022632 0 ustar 00root root 0000000 0000000 unless String.method_defined? :byteslice
require 'backports/tools/arguments'
class String
def byteslice(start, len = Backports::Undefined)
# Argument parsing & checking
if Backports::Undefined == len
if start.is_a?(Range)
range = start
start = Backports.coerce_to_int(range.begin)
start += bytesize if start < 0
last = Backports.coerce_to_int(range.end)
last += bytesize if last < 0
last += 1 unless range.exclude_end?
len = last - start
else
start = Backports.coerce_to_int(start)
start += bytesize if start < 0
len = 1
return if start >= bytesize
end
else
start = Backports.coerce_to_int(start)
start += bytesize if start < 0
len = Backports.coerce_to_int(len)
return if len < 0
end
return if start < 0 || start > bytesize
len = 0 if len < 0
# Actual implementation:
str = unpack("@#{start}a#{len}").first
str = dup.replace(str) unless self.instance_of?(String) # Must return subclass
str.force_encoding(encoding) if respond_to?(:encoding)
str
end
end
end
backports-3.16.0/lib/backports/1.9.3/string/prepend.rb 0000664 0000000 0000000 00000000315 13617065163 0022276 0 ustar 00root root 0000000 0000000 unless String.method_defined? :prepend
require 'backports/tools/arguments'
class String
def prepend(other_str)
replace Backports.coerce_to_str(other_str) + self
self
end
end
end
backports-3.16.0/lib/backports/1.9.rb 0000664 0000000 0000000 00000000126 13617065163 0017172 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 1.9.x
require 'backports/1.9.3'
backports-3.16.0/lib/backports/2.0.0.rb 0000664 0000000 0000000 00000000166 13617065163 0017324 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.0.0
require 'backports/1.9'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/ 0000775 0000000 0000000 00000000000 13617065163 0016774 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020436 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020112 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/array/bsearch.rb 0000664 0000000 0000000 00000001374 13617065163 0022053 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :bsearch
class Array
def bsearch
return to_enum(__method__) unless block_given?
from = 0
to = size - 1
satisfied = nil
while from <= to do
midpoint = (from + to).div(2)
result = yield(cur = self[midpoint])
case result
when Numeric
return cur if result == 0
result = result < 0
when true
satisfied = cur
when nil, false
# nothing to do
else
raise TypeError, "wrong argument type #{result.class} (must be numeric, true, false or nil)"
end
if result
to = midpoint - 1
else
from = midpoint + 1
end
end
satisfied
end
end
end
backports-3.16.0/lib/backports/2.0.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021437 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021113 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/enumerable/lazy.rb 0000664 0000000 0000000 00000016716 13617065163 0022432 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :lazy
require 'backports/tools/arguments'
require 'backports/1.9.1/enumerator/new'
module Enumerable
def lazy
klass = Enumerator::Lazy.send :class_variable_get, :@@lazy_with_no_block # Note: class_variable_get is private in 1.8
Enumerator::Lazy.new(klass.new(self, :each, []))
end
end
class Enumerator
class Yielder
# Current API for Lazy Enumerator does not provide an easy way
# to handle internal state. We "cheat" and use yielder to hold it for us.
# A new yielder is created when generating or after a `rewind`.
# This way we avoid issues like http://bugs.ruby-lang.org/issues/7691
# or http://bugs.ruby-lang.org/issues/7696
attr_accessor :backports_memo
end
class Lazy < Enumerator
@@done = :__backports_lazy_enumeration_done__ # used internally to bail out of an iteration
@@lazy_with_no_block = Struct.new(:object, :method, :args) # used internally to create lazy without block
def initialize(obj)
if obj.is_a?(@@lazy_with_no_block)
@inspect_info = obj
return super(@receiver = obj.object, @method = obj.method || :each, * @args = obj.args)
end
raise ArgumentError, "must supply a block" unless block_given?
@receiver = obj
super() do |yielder, *args|
catch @@done do
obj.each(*args) do |*x|
yield yielder, *x
end
end
end
end
alias_method :force, :to_a
def lazy
self
end
def to_enum(method = :each, *args)
Lazy.new(@@lazy_with_no_block.new(self, method, args))
end
alias_method :enum_for, :to_enum
def inspect
suff = ''
suff << ":#{@method}" unless @method.nil? || @method == :each
suff << "(#{@args.inspect[1...-1]})" if @args && !@args.empty?
"#<#{self.class}: #{@receiver.inspect}#{suff}>"
end
{
:slice_before => //,
:with_index => [],
:cycle => [],
:each_with_object => 42,
:each_slice => 42,
:each_entry => [],
:each_cons => 42,
}.each do |method, args|
next unless Enumerator.method_defined? method
unless [].lazy.send(method, *args).is_a?(Lazy) # Nothing to do if already backported, since it would use to_enum...
module_eval <<-EOT, __FILE__, __LINE__ + 1
def #{method}(*args) # def cycle(*args)
return to_enum(:#{method}, *args) unless block_given? # return to_enum(:cycle, *args) unless block_given?
super # super
end # end
EOT
end
end
def chunk(*)
super.lazy
end if Enumerable.method_defined?(:chunk) && ![].lazy.chunk{}.is_a?(Lazy)
def map
raise ArgumentError, "tried to call lazy map without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
yielder << yield(*values)
end.__set_inspect :map
end
alias_method :collect, :map
def select
raise ArgumentError, "tried to call lazy select without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
values = values.first unless values.size > 1
yielder.yield values if yield values
end.__set_inspect :select
end
alias_method :find_all, :select
def reject
raise ArgumentError, "tried to call lazy reject without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
values = values.first unless values.size > 1
yielder.yield(values) unless yield values
end.__set_inspect :reject
end
def grep(pattern)
if block_given?
# Split for performance
Lazy.new(self) do |yielder, *values|
values = values.first unless values.size > 1
yielder.yield(yield(values)) if pattern === values
end
else
Lazy.new(self) do |yielder, *values|
values = values.first unless values.size > 1
yielder.yield(values) if pattern === values
end
end.__set_inspect :grep, [pattern]
end
def drop(n)
n = Backports::coerce_to_int(n)
Lazy.new(self) do |yielder, *values|
data = yielder.backports_memo ||= {:remain => n}
if data[:remain] > 0
data[:remain] -= 1
else
yielder.yield(*values)
end
end.__set_inspect :drop, [n]
end
def drop_while
raise ArgumentError, "tried to call lazy drop_while without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
data = yielder.backports_memo ||= {:dropping => true}
yielder.yield(*values) unless data[:dropping] &&= yield(*values)
end.__set_inspect :drop_while
end
def take(n)
n = Backports::coerce_to_int(n)
raise ArgumentError, 'attempt to take negative size' if n < 0
Lazy.new(n == 0 ? [] : self) do |yielder, *values|
data = yielder.backports_memo ||= {:remain => n}
yielder.yield(*values)
throw @@done if (data[:remain] -= 1) == 0
end.__set_inspect :take, [n], self
end
def take_while
raise ArgumentError, "tried to call lazy take_while without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
throw @@done unless yield(*values)
yielder.yield(*values)
end.__set_inspect :take_while
end
def flat_map
raise ArgumentError, "tried to call lazy flat_map without a block" unless block_given?
Lazy.new(self) do |yielder, *values|
result = yield(*values)
ary = Backports.is_array?(result)
if ary || (result.respond_to?(:each) && result.respond_to?(:force))
(ary || result).each{|x| yielder << x }
else
yielder << result
end
end.__set_inspect :flat_map
end
alias_method :collect_concat, :flat_map
def zip(*args)
return super if block_given?
arys = args.map{ |arg| Backports.is_array?(arg) }
if arys.all?
# Handle trivial case of multiple array arguments separately
# by avoiding Enumerator#next for efficiency & compatibility
Lazy.new(self) do |yielder, *values|
data = yielder.backports_memo ||= {:iter => 0}
values = values.first unless values.size > 1
yielder << arys.map{|ary| ary[data[:iter]]}.unshift(values)
data[:iter] += 1
end
else
args.each do |a|
raise TypeError, "wrong argument type #{a.class} (must respond to :each)" unless a.respond_to? :each
end
Lazy.new(self) do |yielder, *values|
enums = yielder.backports_memo ||= args.map(&:to_enum)
values = values.first unless values.size > 1
others = enums.map do |arg|
begin
arg.next
rescue StopIteration
nil
end
end
yielder << others.unshift(values)
end
end.__set_inspect :zip, args
end
protected
def __set_inspect(method, args = nil, receiver = nil)
@method = method
@args = args
@receiver = receiver if receiver
self
end
end
end
end
backports-3.16.0/lib/backports/2.0.0/enumerator.rb 0000664 0000000 0000000 00000000117 13617065163 0021501 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/enumerator/ 0000775 0000000 0000000 00000000000 13617065163 0021155 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/enumerator/lazy.rb 0000664 0000000 0000000 00000000052 13617065163 0022456 0 ustar 00root root 0000000 0000000 require 'backports/2.0.0/enumerable/lazy'
backports-3.16.0/lib/backports/2.0.0/env.rb 0000664 0000000 0000000 00000000117 13617065163 0020110 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/env/ 0000775 0000000 0000000 00000000000 13617065163 0017564 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/env/to_h.rb 0000664 0000000 0000000 00000000127 13617065163 0021042 0 ustar 00root root 0000000 0000000 unless ENV.respond_to? :to_h
class << ENV
alias_method :to_h, :to_hash
end
end
backports-3.16.0/lib/backports/2.0.0/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020243 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017717 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/hash/default_proc.rb 0000664 0000000 0000000 00000000607 13617065163 0022716 0 ustar 00root root 0000000 0000000 if (({}.default_proc = nil) rescue true)
require 'backports/tools/alias_method_chain'
require 'backports/1.9.1/hash/default_proc'
class Hash
def default_proc_with_nil=(proc)
if proc == nil
self.default = nil
self
else
self.default_proc_without_nil=(proc)
end
end
Backports.alias_method_chain(self, :default_proc=, :nil)
end
end
backports-3.16.0/lib/backports/2.0.0/hash/to_h.rb 0000664 0000000 0000000 00000000201 13617065163 0021166 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :to_h
class Hash
def to_h
self.class == Hash ? self : {}.replace(self)
end
end
end
backports-3.16.0/lib/backports/2.0.0/nil.rb 0000664 0000000 0000000 00000000117 13617065163 0020102 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/nil/ 0000775 0000000 0000000 00000000000 13617065163 0017556 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/nil/to_h.rb 0000664 0000000 0000000 00000000137 13617065163 0021035 0 ustar 00root root 0000000 0000000 unless NilClass.method_defined? :to_h
class NilClass
def to_h
{}
end
end
end
backports-3.16.0/lib/backports/2.0.0/range.rb 0000664 0000000 0000000 00000000117 13617065163 0020414 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/range/ 0000775 0000000 0000000 00000000000 13617065163 0020070 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/range/bsearch.rb 0000664 0000000 0000000 00000002407 13617065163 0022027 0 ustar 00root root 0000000 0000000 unless Range.method_defined? :bsearch
require 'backports/tools/float_integer_conversion'
class Range
def bsearch
return to_enum(:bsearch) unless block_given?
from = self.begin
to = self.end
unless from.is_a?(Numeric) && to.is_a?(Numeric)
raise TypeError, "can't do binary search for #{from.class}"
end
midpoint = nil
if from.is_a?(Integer) && to.is_a?(Integer)
convert = Proc.new{ midpoint }
else
from = Backports.float_to_integer(from.to_f)
to = Backports.float_to_integer(to.to_f)
convert = Proc.new{ Backport.integer_to_float(midpoint) }
end
to -= 1 if exclude_end?
satisfied = nil
while from <= to do
midpoint = (from + to).div(2)
result = yield(cur = convert.call)
case result
when Numeric
return cur if result == 0
result = result < 0
when true
satisfied = cur
when nil, false
# nothing to do
else
raise TypeError, "wrong argument type #{result.class} (must be numeric, true, false or nil)"
end
if result
to = midpoint - 1
else
from = midpoint + 1
end
end
satisfied
end
end
end
backports-3.16.0/lib/backports/2.0.0/range/size.rb 0000664 0000000 0000000 00000000535 13617065163 0021372 0 ustar 00root root 0000000 0000000 unless Range.method_defined? :size
class Range
def size
return nil unless self.begin.is_a?(Numeric) && self.end.is_a?(Numeric)
size = self.end - self.begin
return 0 if size <= 0
return size if size == Float::INFINITY
if exclude_end?
size.ceil
else
size.floor + 1
end
end
end
end
backports-3.16.0/lib/backports/2.0.0/stdlib.rb 0000664 0000000 0000000 00000000042 13617065163 0020576 0 ustar 00root root 0000000 0000000 Backports::StdLib.extend_relative
backports-3.16.0/lib/backports/2.0.0/stdlib/ 0000775 0000000 0000000 00000000000 13617065163 0020255 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/stdlib/abbrev.rb 0000664 0000000 0000000 00000000067 13617065163 0022046 0 ustar 00root root 0000000 0000000 # For testing purposes only, see _backport_guards_test
backports-3.16.0/lib/backports/2.0.0/stdlib/fake_stdlib_lib.rb 0000664 0000000 0000000 00000000067 13617065163 0023702 0 ustar 00root root 0000000 0000000 # For testing purposes only, see _backport_guards_test
backports-3.16.0/lib/backports/2.0.0/stdlib/ostruct.rb 0000664 0000000 0000000 00000001131 13617065163 0022301 0 ustar 00root root 0000000 0000000 class OpenStruct
def [](name)
@table[name.to_sym]
end unless method_defined? :[]
def []=(name, value)
modifiable[new_ostruct_member(name)] = value
end unless method_defined? :[]=
def eql?(other)
return false unless other.kind_of?(OpenStruct)
@table.eql?(other.table)
end unless method_defined? :eql?
def hash
@table.hash
end unless method_defined? :hash
def each_pair
return to_enum(:each_pair) unless block_given?
@table.each_pair{|p| yield p}
end unless method_defined? :each_pair
def to_h
@table.dup
end unless method_defined? :to_h
end
backports-3.16.0/lib/backports/2.0.0/struct.rb 0000664 0000000 0000000 00000000117 13617065163 0020644 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.0.0/struct/ 0000775 0000000 0000000 00000000000 13617065163 0020320 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.0.0/struct/to_h.rb 0000664 0000000 0000000 00000000240 13617065163 0021572 0 ustar 00root root 0000000 0000000 unless Struct.method_defined? :to_h
class Struct
def to_h
h = {}
self.class.members.each{|m| h[m.to_sym] = self[m]}
h
end
end
end
backports-3.16.0/lib/backports/2.0.rb 0000664 0000000 0000000 00000000126 13617065163 0017162 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.0.x
require 'backports/2.0.0'
backports-3.16.0/lib/backports/2.1.0.rb 0000664 0000000 0000000 00000000166 13617065163 0017325 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.1.0
require 'backports/2.0'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/ 0000775 0000000 0000000 00000000000 13617065163 0016775 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020437 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020113 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/array/to_h.rb 0000664 0000000 0000000 00000000154 13617065163 0021371 0 ustar 00root root 0000000 0000000 # No need to specialize it, just use Enumerable's implementation:
require 'backports/2.1.0/enumerable/to_h'
backports-3.16.0/lib/backports/2.1.0/bignum.rb 0000664 0000000 0000000 00000000117 13617065163 0020602 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/bignum/ 0000775 0000000 0000000 00000000000 13617065163 0020256 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/bignum/bit_length.rb 0000664 0000000 0000000 00000001137 13617065163 0022724 0 ustar 00root root 0000000 0000000 unless Integer.method_defined?(:bit_length) || Bignum.method_defined?(:bit_length)
require 'backports/2.0.0/range/bsearch'
class Bignum
def bit_length
# We use the fact that bignums use the minimum number of "words" necessary
# where "words" is some number of bytes <= to the size of a fixnum
# So we have (size - word_size) * 8 < bit_length <= size * 8
n = 8 * (size - 42.size)
smaller = self >> n
if smaller >= 0
smaller += 1
else
smaller = -smaller
end
n + (1..8 * 42.size).bsearch{|i| smaller <= (1 << i) }
end
end
end
backports-3.16.0/lib/backports/2.1.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021440 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021114 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/enumerable/to_h.rb 0000664 0000000 0000000 00000000761 13617065163 0022376 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined?(:to_h)
require 'backports/tools/arguments'
require 'backports/1.9.2/enumerable/each_entry'
module Enumerable
def to_h(*args)
h = {}
each_entry(*args) do |key_value|
key_value = Backports.coerce_to_ary(key_value)
if key_value.size != 2
raise ArgumentError, "element has wrong array length (expected 2, was #{key_value.size})"
end
h[ key_value[0] ] = key_value[1]
end
h
end
end
end
backports-3.16.0/lib/backports/2.1.0/fixnum.rb 0000664 0000000 0000000 00000000117 13617065163 0020627 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/fixnum/ 0000775 0000000 0000000 00000000000 13617065163 0020303 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/fixnum/bit_length.rb 0000664 0000000 0000000 00000000455 13617065163 0022753 0 ustar 00root root 0000000 0000000 unless Integer.method_defined?(:bit_length) || Fixnum.method_defined?(:bit_length)
require 'backports/2.0.0/range/bsearch'
class Fixnum
def bit_length
n = if self >= 0
self + 1
else
-self
end
(0...8 * size).bsearch{|i| n <= (1 << i) }
end
end
end
backports-3.16.0/lib/backports/2.1.0/module.rb 0000664 0000000 0000000 00000000117 13617065163 0020606 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.1.0/module/ 0000775 0000000 0000000 00000000000 13617065163 0020262 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.1.0/module/include.rb 0000664 0000000 0000000 00000000130 13617065163 0022224 0 ustar 00root root 0000000 0000000 if Module.private_method_defined? :include
class Module
public :include
end
end
backports-3.16.0/lib/backports/2.1.rb 0000664 0000000 0000000 00000000136 13617065163 0017164 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.1 and below
require 'backports/2.1.0'
backports-3.16.0/lib/backports/2.2.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017324 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.2
require 'backports/2.1'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/ 0000775 0000000 0000000 00000000000 13617065163 0016776 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021441 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021115 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/enumerable/slice_after.rb 0000664 0000000 0000000 00000001460 13617065163 0023723 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :slice_after
require 'backports/tools/arguments'
require 'backports/1.9.1/enumerator/new'
module Enumerable
def slice_after(pattern = Backports::Undefined, &block)
raise ArgumentError, 'both pattern and block are given' if pattern != Backports::Undefined && block
raise ArgumentError, 'wrong number of arguments (given 0, expected 1)' if pattern == Backports::Undefined && !block
enum = self
block ||= Proc.new{|elem| pattern === elem}
Enumerator.new do |y|
acc = []
enum.each do |*elem|
elem = elem.first if elem.length == 1
acc << elem
if block.call(elem)
y.yield acc
acc = []
end
end
y.yield acc unless acc.empty?
end
end
end
end
backports-3.16.0/lib/backports/2.2.0/enumerable/slice_when.rb 0000664 0000000 0000000 00000001322 13617065163 0023560 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :slice_when
require 'backports/tools/arguments'
require 'backports/1.9.1/enumerator/new'
module Enumerable
def slice_when(&block)
raise ArgumentError, 'tried to create Proc object without a block' unless block
enum = self
Enumerator.new do |y|
acc = []
prev = Backports::Undefined
enum.each do |*elem|
elem = elem.first if elem.length == 1
unless prev == Backports::Undefined
if block.call(prev, elem)
y.yield acc
acc = []
end
end
acc << elem
prev = elem
end
y.yield acc unless acc.empty?
end
end
end
end
backports-3.16.0/lib/backports/2.2.0/float.rb 0000664 0000000 0000000 00000000117 13617065163 0020427 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/float/ 0000775 0000000 0000000 00000000000 13617065163 0020103 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/float/next_float.rb 0000664 0000000 0000000 00000000476 13617065163 0022602 0 ustar 00root root 0000000 0000000 unless Float.method_defined? :next_float
require 'backports/tools/float_integer_conversion'
class Float
def next_float
return Float::INFINITY if self == Float::INFINITY
r = Backports.integer_to_float(Backports.float_to_integer(self)+1)
r == 0 ? -0.0 : r # Map +0.0 to -0.0
end
end
end
backports-3.16.0/lib/backports/2.2.0/float/prev_float.rb 0000664 0000000 0000000 00000000474 13617065163 0022576 0 ustar 00root root 0000000 0000000 unless Float.method_defined? :prev_float
require 'backports/tools/float_integer_conversion'
require 'backports/1.9.2/float/infinity'
class Float
def prev_float
return -Float::INFINITY if self == -Float::INFINITY
Backports.integer_to_float(Backports.float_to_integer(self)-1)
end
end
end
backports-3.16.0/lib/backports/2.2.0/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020602 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020256 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/kernel/itself.rb 0000664 0000000 0000000 00000000142 13617065163 0022066 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :itself
module Kernel
def itself
self
end
end
end
backports-3.16.0/lib/backports/2.2.0/method.rb 0000664 0000000 0000000 00000000117 13617065163 0020602 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/method/ 0000775 0000000 0000000 00000000000 13617065163 0020256 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/method/curry.rb 0000664 0000000 0000000 00000000242 13617065163 0021745 0 ustar 00root root 0000000 0000000 unless Method.method_defined? :curry
require 'backports/1.9.1/proc/curry'
class Method
def curry(argc = nil)
to_proc.curry(argc)
end
end
end
backports-3.16.0/lib/backports/2.2.0/method/super_method.rb 0000664 0000000 0000000 00000001114 13617065163 0023276 0 ustar 00root root 0000000 0000000 unless Method.method_defined? :super_method
require 'backports/1.8.7/array/find_index'
class Method
def super_method
singleton_klass = class << receiver; self; end
call_chain = singleton_klass.ancestors
# find current position in call chain:
skip = call_chain.find_index{|c| c == owner} or return
call_chain = call_chain.drop(skip + 1)
# find next in chain with a definition:
next_index = call_chain.find_index{|c| c.method_defined? name}
next_index && call_chain[next_index].instance_method(name).bind(receiver)
end
end
end
backports-3.16.0/lib/backports/2.2.0/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020630 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.2.0/string/ 0000775 0000000 0000000 00000000000 13617065163 0020304 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.2.0/string/unicode_normalize.rb 0000664 0000000 0000000 00000002531 13617065163 0024340 0 ustar 00root root 0000000 0000000 # Adapted from CRuby
unless String.method_defined? :unicode_normalize
if (Regexp.compile("[\u{11100}-\u{11102}]") rescue false)
class String
def unicode_normalize(form = :nfc)
require 'backports/tools/normalize.rb' unless defined? UnicodeNormalize
## The following line can be uncommented to avoid repeated checking for
## UnicodeNormalize. However, tests didn't show any noticeable speedup
## when doing this. This comment also applies to the commented out lines
## in String#unicode_normalize! and String#unicode_normalized?.
# String.send(:define_method, :unicode_normalize, ->(form = :nfc) { UnicodeNormalize.normalize(self, form) } )
UnicodeNormalize.normalize(self, form)
end
def unicode_normalize!(form = :nfc)
require 'backports/tools/normalize.rb' unless defined? UnicodeNormalize
# String.send(:define_method, :unicode_normalize!, ->(form = :nfc) { replace(unicode_normalize(form)) } )
replace(unicode_normalize(form))
end
def unicode_normalized?(form = :nfc)
require 'backports/tools/normalize.rb' unless defined? UnicodeNormalize
# String.send(:define_method, :unicode_normalized?, ->(form = :nfc) { UnicodeNormalize.normalized?(self, form) } )
UnicodeNormalize.normalized?(self, form)
end
end
end
end
backports-3.16.0/lib/backports/2.2.rb 0000664 0000000 0000000 00000000136 13617065163 0017165 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.2 and below
require 'backports/2.2.0'
backports-3.16.0/lib/backports/2.3.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017325 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.3
require 'backports/2.2'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/ 0000775 0000000 0000000 00000000000 13617065163 0016777 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020441 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020115 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/array/bsearch_index.rb 0000664 0000000 0000000 00000001414 13617065163 0023240 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :bsearch_index
class Array
def bsearch_index
return to_enum(__method__) unless block_given?
from = 0
to = size - 1
satisfied = nil
while from <= to do
midpoint = (from + to).div(2)
result = yield(self[midpoint])
case result
when Numeric
return midpoint if result == 0
result = result < 0
when true
satisfied = midpoint
when nil, false
# nothing to do
else
raise TypeError, "wrong argument type #{result.class} (must be numeric, true, false or nil)"
end
if result
to = midpoint - 1
else
from = midpoint + 1
end
end
satisfied
end
end
end
backports-3.16.0/lib/backports/2.3.0/array/dig.rb 0000664 0000000 0000000 00000000423 13617065163 0021204 0 ustar 00root root 0000000 0000000 unless Array.method_defined? :dig
class Array
def dig(index, *rest)
val = self[index]
return val if rest.empty? || val == nil
raise TypeError, "#{val.class} does not have #dig method" unless val.respond_to? :dig
val.dig(*rest)
end
end
end
backports-3.16.0/lib/backports/2.3.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021442 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021116 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/enumerable/chunk_while.rb 0000664 0000000 0000000 00000001330 13617065163 0023740 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :chunk_while
require 'backports/tools/arguments'
require 'backports/1.9.1/enumerator/new'
module Enumerable
def chunk_while(&block)
raise ArgumentError, 'tried to create Proc object without a block' unless block
enum = self
Enumerator.new do |y|
acc = []
prev = Backports::Undefined
enum.each do |*elem|
elem = elem.first if elem.length == 1
unless prev == Backports::Undefined
unless block.call(prev, elem)
y.yield acc
acc = []
end
end
acc << elem
prev = elem
end
y.yield acc unless acc.empty?
end
end
end
end
backports-3.16.0/lib/backports/2.3.0/enumerable/grep_v.rb 0000664 0000000 0000000 00000000534 13617065163 0022727 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :grep_v
require 'backports/1.9.2/enumerable/each_entry'
module Enumerable
def grep_v(pattern)
if block_given?
acc = []
each_entry do |v|
acc << yield(v) unless pattern === v
end
acc
else
reject {|v| pattern === v }
end
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020246 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017722 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/hash/dig.rb 0000664 0000000 0000000 00000000415 13617065163 0021012 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :dig
class Hash
def dig(key, *rest)
val = self[key]
return val if rest.empty? || val == nil
raise TypeError, "#{val.class} does not have #dig method" unless val.respond_to? :dig
val.dig(*rest)
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/fetch_values.rb 0000664 0000000 0000000 00000000246 13617065163 0022721 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :fetch_values
class Hash
def fetch_values(*keys, &block)
keys.map do |k|
fetch(k, &block)
end
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/gt.rb 0000664 0000000 0000000 00000000326 13617065163 0020662 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :>
require 'backports/tools/arguments'
require 'backports/2.3.0/hash/lt'
class Hash
def >(hash)
hash = Backports.coerce_to_hash(hash)
hash < self
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/gte.rb 0000664 0000000 0000000 00000000332 13617065163 0021024 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :>=
require 'backports/tools/arguments'
require 'backports/2.3.0/hash/lte'
class Hash
def >=(hash)
hash = Backports.coerce_to_hash(hash)
hash <= self
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/lt.rb 0000664 0000000 0000000 00000000504 13617065163 0020665 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :<
require 'backports/tools/arguments'
class Hash
def <(hash)
hash = Backports.coerce_to_hash(hash)
return false unless size < hash.size
each do |k, v|
v2 = hash.fetch(k){ return false }
return false unless v2 == v
end
true
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/lte.rb 0000664 0000000 0000000 00000000507 13617065163 0021035 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :<=
require 'backports/tools/arguments'
class Hash
def <=(hash)
hash = Backports.coerce_to_hash(hash)
return false unless size <= hash.size
each do |k, v|
v2 = hash.fetch(k){ return false }
return false unless v2 == v
end
true
end
end
end
backports-3.16.0/lib/backports/2.3.0/hash/to_proc.rb 0000664 0000000 0000000 00000000204 13617065163 0021710 0 ustar 00root root 0000000 0000000 unless Hash.method_defined? :to_proc
class Hash
def to_proc
h = self
Proc.new{|*args| h[*args]}
end
end
end
backports-3.16.0/lib/backports/2.3.0/numeric.rb 0000664 0000000 0000000 00000000117 13617065163 0020765 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/numeric/ 0000775 0000000 0000000 00000000000 13617065163 0020441 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/numeric/negative.rb 0000664 0000000 0000000 00000000155 13617065163 0022571 0 ustar 00root root 0000000 0000000 unless Numeric.method_defined? :negative?
class Numeric
def negative?
self < 0
end
end
end
backports-3.16.0/lib/backports/2.3.0/numeric/positive.rb 0000664 0000000 0000000 00000000155 13617065163 0022631 0 ustar 00root root 0000000 0000000 unless Numeric.method_defined? :positive?
class Numeric
def positive?
self > 0
end
end
end
backports-3.16.0/lib/backports/2.3.0/string/ 0000775 0000000 0000000 00000000000 13617065163 0020305 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/string/uminus.rb 0000664 0000000 0000000 00000000160 13617065163 0022147 0 ustar 00root root 0000000 0000000 unless String.method_defined? :-@
class String
def -@
frozen? ? self : dup.freeze
end
end
end
backports-3.16.0/lib/backports/2.3.0/string/uplus.rb 0000664 0000000 0000000 00000000151 13617065163 0021777 0 ustar 00root root 0000000 0000000 unless String.method_defined? :+@
class String
def +@
frozen? ? dup : self
end
end
end
backports-3.16.0/lib/backports/2.3.0/struct.rb 0000664 0000000 0000000 00000000117 13617065163 0020647 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.3.0/struct/ 0000775 0000000 0000000 00000000000 13617065163 0020323 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.3.0/struct/dig.rb 0000664 0000000 0000000 00000000507 13617065163 0021415 0 ustar 00root root 0000000 0000000 unless Struct.method_defined? :dig
class Struct
def dig(key, *rest)
return nil unless respond_to?(key)
val = self.public_send(key)
return val if rest.empty? || val == nil
raise TypeError, "#{val.class} does not have #dig method" unless val.respond_to? :dig
val.dig(*rest)
end
end
end
backports-3.16.0/lib/backports/2.3.rb 0000664 0000000 0000000 00000000136 13617065163 0017166 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.3 and below
require 'backports/2.3.0'
backports-3.16.0/lib/backports/2.4.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017326 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.4
require 'backports/2.3'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/ 0000775 0000000 0000000 00000000000 13617065163 0017000 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/comparable.rb 0000664 0000000 0000000 00000000117 13617065163 0021431 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/comparable/ 0000775 0000000 0000000 00000000000 13617065163 0021105 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/comparable/clamp.rb 0000664 0000000 0000000 00000000672 13617065163 0022533 0 ustar 00root root 0000000 0000000 unless Comparable.method_defined? :clamp
require 'backports/tools/arguments'
module Comparable
def clamp(min, max)
if Backports.coerce_to_comparison(min, max) > 0
raise ArgumentError, "min argument must be smaller than max argument"
end
case Backports.coerce_to_comparison(self, min)
when 0
self
when -1
min
else
self > max ? max : self
end
end
end
end
backports-3.16.0/lib/backports/2.4.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021443 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021117 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/enumerable/sum.rb 0000664 0000000 0000000 00000000356 13617065163 0022254 0 ustar 00root root 0000000 0000000 module Enumerable
unless method_defined? :sum
require 'backports/1.8.7/enumerable/inject'
def sum(accumulator = 0, &block)
values = block_given? ? map(&block) : self
values.inject(accumulator, :+)
end
end
end
backports-3.16.0/lib/backports/2.4.0/enumerable/uniq.rb 0000664 0000000 0000000 00000000142 13617065163 0022415 0 ustar 00root root 0000000 0000000 module Enumerable
def uniq(&block)
to_a.uniq(&block)
end unless method_defined? :uniq
end
backports-3.16.0/lib/backports/2.4.0/false_class.rb 0000664 0000000 0000000 00000000117 13617065163 0021603 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/false_class/ 0000775 0000000 0000000 00000000000 13617065163 0021257 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/false_class/dup.rb 0000664 0000000 0000000 00000000111 13617065163 0022365 0 ustar 00root root 0000000 0000000 class FalseClass
def dup
self
end
end if (false.dup rescue true)
backports-3.16.0/lib/backports/2.4.0/fixnum.rb 0000664 0000000 0000000 00000000117 13617065163 0020632 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/fixnum/ 0000775 0000000 0000000 00000000000 13617065163 0020306 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/fixnum/dup.rb 0000664 0000000 0000000 00000000106 13617065163 0021420 0 ustar 00root root 0000000 0000000 class Fixnum
def dup
self
end
end unless (0.dup rescue false)
backports-3.16.0/lib/backports/2.4.0/float.rb 0000664 0000000 0000000 00000000117 13617065163 0020431 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/float/ 0000775 0000000 0000000 00000000000 13617065163 0020105 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/float/dup.rb 0000664 0000000 0000000 00000000107 13617065163 0021220 0 ustar 00root root 0000000 0000000 class Float
def dup
self
end
end unless (0.0.dup rescue false)
backports-3.16.0/lib/backports/2.4.0/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020247 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017723 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/hash/compact.rb 0000664 0000000 0000000 00000000376 13617065163 0021704 0 ustar 00root root 0000000 0000000 class Hash
def compact
h = {}
each do |key, value|
h[key] = value unless value == nil
end
h
end unless method_defined? :compact
def compact!
reject! {|_key, value| value == nil}
end unless method_defined? :compact!
end
backports-3.16.0/lib/backports/2.4.0/hash/transform_values.rb 0000664 0000000 0000000 00000001004 13617065163 0023635 0 ustar 00root root 0000000 0000000 class Hash
def transform_values
return to_enum(:transform_values){ size } unless block_given?
h = {}
each do |key, value|
h[key] = yield value
end
h
end unless method_defined? :transform_values
def transform_values!
return to_enum(:transform_values!){ size } unless block_given?
reject!{} if frozen? # Force error triggerring if frozen, in case of empty array
each do |key, value|
self[key] = yield value
end
end unless method_defined? :transform_values!
end
backports-3.16.0/lib/backports/2.4.0/nil_class.rb 0000664 0000000 0000000 00000000117 13617065163 0021273 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/nil_class/ 0000775 0000000 0000000 00000000000 13617065163 0020747 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/nil_class/dup.rb 0000664 0000000 0000000 00000000105 13617065163 0022060 0 ustar 00root root 0000000 0000000 class NilClass
def dup
self
end
end if (nil.dup rescue true)
backports-3.16.0/lib/backports/2.4.0/regexp.rb 0000664 0000000 0000000 00000000117 13617065163 0020616 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/regexp/ 0000775 0000000 0000000 00000000000 13617065163 0020272 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/regexp/match.rb 0000664 0000000 0000000 00000000166 13617065163 0021716 0 ustar 00root root 0000000 0000000 unless Regexp.method_defined? :match?
class Regexp
def match?(*args)
!match(*args).nil?
end
end
end
backports-3.16.0/lib/backports/2.4.0/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020632 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/string/ 0000775 0000000 0000000 00000000000 13617065163 0020306 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/string/match.rb 0000664 0000000 0000000 00000000166 13617065163 0021732 0 ustar 00root root 0000000 0000000 unless String.method_defined? :match?
class String
def match?(*args)
!match(*args).nil?
end
end
end
backports-3.16.0/lib/backports/2.4.0/true_class.rb 0000664 0000000 0000000 00000000117 13617065163 0021470 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.4.0/true_class/ 0000775 0000000 0000000 00000000000 13617065163 0021144 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.4.0/true_class/dup.rb 0000664 0000000 0000000 00000000115 13617065163 0022256 0 ustar 00root root 0000000 0000000 class TrueClass
def dup
self
end
end unless (true.dup rescue false)
backports-3.16.0/lib/backports/2.4.rb 0000664 0000000 0000000 00000000136 13617065163 0017167 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.4 and below
require 'backports/2.4.0'
backports-3.16.0/lib/backports/2.5.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017327 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.5
require 'backports/2.4'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/ 0000775 0000000 0000000 00000000000 13617065163 0017001 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020443 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020117 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/array/append.rb 0000664 0000000 0000000 00000000115 13617065163 0021710 0 ustar 00root root 0000000 0000000 class Array
alias_method :append, :push unless [].respond_to?(:append)
end
backports-3.16.0/lib/backports/2.5.0/array/prepend.rb 0000664 0000000 0000000 00000000122 13617065163 0022074 0 ustar 00root root 0000000 0000000 class Array
alias_method :prepend, :unshift unless [].respond_to?(:prepend)
end
backports-3.16.0/lib/backports/2.5.0/dir.rb 0000664 0000000 0000000 00000000117 13617065163 0020103 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/dir/ 0000775 0000000 0000000 00000000000 13617065163 0017557 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/dir/children.rb 0000664 0000000 0000000 00000000353 13617065163 0021675 0 ustar 00root root 0000000 0000000 class Dir
Backports::EXCLUDED_CHILDREN = ['.', '..'].freeze unless Backports.const_defined?('EXCLUDED_CHILDREN')
def self.children(*args)
entries(*args) - Backports::EXCLUDED_CHILDREN
end
end unless Dir.respond_to? :children
backports-3.16.0/lib/backports/2.5.0/dir/each_child.rb 0000664 0000000 0000000 00000000511 13617065163 0022144 0 ustar 00root root 0000000 0000000 class Dir
Backports::EXCLUDED_CHILDREN = ['.', '..'].freeze unless Backports.const_defined?('EXCLUDED_CHILDREN')
def self.each_child(*args)
return to_enum(__method__, *args) unless block_given?
foreach(*args) { |f| yield f unless Backports::EXCLUDED_CHILDREN.include? f }
end
end unless Dir.respond_to? :each_child
backports-3.16.0/lib/backports/2.5.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021444 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021120 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/enumerable/all.rb 0000664 0000000 0000000 00000000671 13617065163 0022221 0 ustar 00root root 0000000 0000000 if Enumerable.instance_method(:all?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Enumerable
def all_with_pattern?(pattern = Backports::Undefined, &block)
return all_without_pattern?(&block) if Backports::Undefined == pattern
each_entry { |x| return false unless pattern === x }
true
end
Backports.alias_method_chain(self, :all?, :pattern)
end
end
backports-3.16.0/lib/backports/2.5.0/enumerable/any.rb 0000664 0000000 0000000 00000002514 13617065163 0022236 0 ustar 00root root 0000000 0000000 if Enumerable.instance_method(:any?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Enumerable
def any_with_pattern?(pattern = Backports::Undefined, &block)
return any_without_pattern?(&block) if Backports::Undefined == pattern
each_entry { |x| return true if pattern === x }
false
end
Backports.alias_method_chain(self, :any?, :pattern)
end
end
# MRI specializes `any?` for Array and Hash, so redefine those too
if Array.instance_method(:any?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Array
def any_with_pattern?(pattern = Backports::Undefined, &block)
return any_without_pattern?(&block) if Backports::Undefined == pattern
each_entry { |x| return true if pattern === x }
false
end
Backports.alias_method_chain(self, :any?, :pattern)
end
end
if Hash.instance_method(:any?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
class Hash
def any_with_pattern?(pattern = Backports::Undefined, &block)
return any_without_pattern?(&block) if Backports::Undefined == pattern
each_entry { |x| return true if pattern === x }
false
end
Backports.alias_method_chain(self, :any?, :pattern)
end
end
backports-3.16.0/lib/backports/2.5.0/enumerable/none.rb 0000664 0000000 0000000 00000000744 13617065163 0022411 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/enumerable/none'
if Enumerable.instance_method(:none?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Enumerable
def none_with_pattern?(pattern = Backports::Undefined, &block)
return none_without_pattern?(&block) if Backports::Undefined == pattern
each_entry { |x| return false if pattern === x }
true
end
Backports.alias_method_chain(self, :none?, :pattern)
end
end
backports-3.16.0/lib/backports/2.5.0/enumerable/one.rb 0000664 0000000 0000000 00000001113 13617065163 0022222 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/enumerable/one'
if Enumerable.instance_method(:one?).arity == 0
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Enumerable
def one_with_pattern?(pattern = Backports::Undefined, &block)
return one_without_pattern?(&block) if Backports::Undefined == pattern
found_one = false
each_entry do |o|
if pattern === o
return false if found_one
found_one = true
end
end
found_one
end
Backports.alias_method_chain(self, :one?, :pattern)
end
end
backports-3.16.0/lib/backports/2.5.0/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020250 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017724 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/hash/slice.rb 0000664 0000000 0000000 00000000210 13617065163 0021341 0 ustar 00root root 0000000 0000000 class Hash
def slice(*keys)
h = {}
keys.each { |k| h[k] = self[k] if key?(k) }
h
end unless method_defined?(:slice)
end
backports-3.16.0/lib/backports/2.5.0/hash/transform_keys.rb 0000664 0000000 0000000 00000000715 13617065163 0023322 0 ustar 00root root 0000000 0000000 class Hash
def transform_keys
return to_enum(:transform_keys){ size } unless block_given?
h = {}
each do |key, value|
h[yield key] = value
end
h
end unless method_defined? :transform_keys
def transform_keys!
return enum_for(:transform_keys!) { size } unless block_given?
merge!({}) if frozen?
keys.each do |key|
self[yield(key)] = delete(key)
end
self
end unless method_defined? :transform_keys!
end
backports-3.16.0/lib/backports/2.5.0/integer.rb 0000664 0000000 0000000 00000000117 13617065163 0020762 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/integer/ 0000775 0000000 0000000 00000000000 13617065163 0020436 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/integer/allbits.rb 0000664 0000000 0000000 00000000257 13617065163 0022421 0 ustar 00root root 0000000 0000000 class Integer
require 'backports/tools/arguments'
def allbits?(n)
n = Backports.coerce_to_int(n)
n & self == n
end
end unless Integer.method_defined? :allbits?
backports-3.16.0/lib/backports/2.5.0/integer/anybits.rb 0000664 0000000 0000000 00000000257 13617065163 0022440 0 ustar 00root root 0000000 0000000 class Integer
require 'backports/tools/arguments'
def anybits?(n)
n = Backports.coerce_to_int(n)
n & self != 0
end
end unless Integer.method_defined? :anybits?
backports-3.16.0/lib/backports/2.5.0/integer/nobits.rb 0000664 0000000 0000000 00000000255 13617065163 0022263 0 ustar 00root root 0000000 0000000 class Integer
require 'backports/tools/arguments'
def nobits?(n)
n = Backports.coerce_to_int(n)
n & self == 0
end
end unless Integer.method_defined? :nobits?
backports-3.16.0/lib/backports/2.5.0/integer/sqrt.rb 0000664 0000000 0000000 00000001036 13617065163 0021754 0 ustar 00root root 0000000 0000000 class Integer
require 'backports/tools/arguments'
require 'backports/2.1.0/bignum/bit_length'
require 'backports/2.1.0/fixnum/bit_length'
def self.sqrt(n)
n = Backports.coerce_to_int(n)
return Math.sqrt(n).to_i if n <= 9_999_899_999_899_999_322_536_673_279
bits_shift = n.bit_length/2 + 1
bitn_mask = root = 1 << bits_shift
while true
root ^= bitn_mask if (root * root) > n
bitn_mask >>= 1
return root if bitn_mask == 0
root |= bitn_mask
end
end
end unless Integer.respond_to? :sqrt
backports-3.16.0/lib/backports/2.5.0/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020605 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020261 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/kernel/yield_self.rb 0000664 0000000 0000000 00000000224 13617065163 0022723 0 ustar 00root root 0000000 0000000 module Kernel
def yield_self
return to_enum(__method__) { 1 } unless block_given?
yield self
end unless method_defined? :yield_self
end
backports-3.16.0/lib/backports/2.5.0/module.rb 0000664 0000000 0000000 00000000117 13617065163 0020612 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/module/ 0000775 0000000 0000000 00000000000 13617065163 0020266 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/module/alias_method.rb 0000664 0000000 0000000 00000000051 13617065163 0023240 0 ustar 00root root 0000000 0000000 class Module
public :alias_method
end
backports-3.16.0/lib/backports/2.5.0/module/attr.rb 0000664 0000000 0000000 00000000040 13617065163 0021557 0 ustar 00root root 0000000 0000000 class Module
public :attr
end
backports-3.16.0/lib/backports/2.5.0/module/attr_accessor.rb 0000664 0000000 0000000 00000000051 13617065163 0023443 0 ustar 00root root 0000000 0000000 class Module
public :attr_accessor
end
backports-3.16.0/lib/backports/2.5.0/module/attr_reader.rb 0000664 0000000 0000000 00000000047 13617065163 0023110 0 ustar 00root root 0000000 0000000 class Module
public :attr_reader
end
backports-3.16.0/lib/backports/2.5.0/module/attr_writer.rb 0000664 0000000 0000000 00000000047 13617065163 0023162 0 ustar 00root root 0000000 0000000 class Module
public :attr_writer
end
backports-3.16.0/lib/backports/2.5.0/module/define_method.rb 0000664 0000000 0000000 00000000051 13617065163 0023401 0 ustar 00root root 0000000 0000000 class Module
public :define_method
end
backports-3.16.0/lib/backports/2.5.0/module/remove_method.rb 0000664 0000000 0000000 00000000051 13617065163 0023444 0 ustar 00root root 0000000 0000000 class Module
public :remove_method
end
backports-3.16.0/lib/backports/2.5.0/module/undef_method.rb 0000664 0000000 0000000 00000000050 13617065163 0023247 0 ustar 00root root 0000000 0000000 class Module
public :undef_method
end
backports-3.16.0/lib/backports/2.5.0/string.rb 0000664 0000000 0000000 00000000117 13617065163 0020633 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/string/ 0000775 0000000 0000000 00000000000 13617065163 0020307 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/string/delete_prefix.rb 0000664 0000000 0000000 00000001216 13617065163 0023453 0 ustar 00root root 0000000 0000000 unless String.method_defined? :delete_prefix
require 'backports/tools/arguments'
class String
def delete_prefix(prefix)
prefix = Backports.coerce_to_str(prefix)
if rindex(prefix, 0)
self[prefix.length..-1]
else
dup
end
end
end
end
unless String.method_defined? :delete_prefix!
require 'backports/tools/arguments'
class String
def delete_prefix!(prefix)
prefix = Backports.coerce_to_str(prefix)
chomp! if frozen?
len = prefix.length
if len > 0 && rindex(prefix, 0)
self[0...prefix.length] = ''
self
else
nil
end
end
end
end
backports-3.16.0/lib/backports/2.5.0/string/delete_suffix.rb 0000664 0000000 0000000 00000001245 13617065163 0023464 0 ustar 00root root 0000000 0000000 unless String.method_defined? :delete_suffix
require 'backports/tools/arguments'
class String
def delete_suffix(suffix)
suffix = Backports.coerce_to_str(suffix)
len = suffix.length
if len > 0 && index(suffix, -len)
self[0...-len]
else
dup
end
end
end
end
unless String.method_defined? :delete_suffix!
require 'backports/tools/arguments'
class String
def delete_suffix!(suffix)
suffix = Backports.coerce_to_str(suffix)
chomp! if frozen?
len = suffix.length
if len > 0 && index(suffix, -len)
self[-len..-1] = ''
self
else
nil
end
end
end
end
backports-3.16.0/lib/backports/2.5.0/string/undump.rb 0000664 0000000 0000000 00000005012 13617065163 0022142 0 ustar 00root root 0000000 0000000 unless String.method_defined? :undump
class String
def undump
# Making sure to return a String and not a subclass
string = to_s
raise 'string contains null byte' if string["\0"]
raise 'non-ASCII character detected' unless string.ascii_only?
#raise '.force_encoding("...") format is not supported by backports' if string.match(/\A".*"\.force_encoding\("[^"]*"\)\z/)
match = string.match(/\A(".*?"?)(?:\.force_encoding\("([^"]*)"\))?\z/)
if match
string = match[1]
encoding = match[2]
else
raise %(invalid dumped string; not wrapped with '"' nor '"...".force_encoding("...")' form)
end
# Ruby 1.9.3 does weird things to encoding during gsub
encoding ||= string.encoding.to_s
# Unescaped have an even number of backslashes in front of them
# because the double-quote is included, the unescaped quotes are where the size is odd
nb_unescaped_quote = string.scan(/\\*"/).select { |s| s.size.odd? }.size
raise 'unterminated dumped string' if nb_unescaped_quote == 1
if string[-1] != '"' || nb_unescaped_quote > 2
raise %(invalid dumped string; not wrapped with '"' nor '"...".force_encoding("...")' form)
end
string = string[1...-1]
if RUBY_VERSION >= '1.9'
# Look-arounds are not supported in ruby 1.8. Using a string with Regexp avoids the SyntaxError in 1.8.7
# \xY, \x3Y and finishing with \x
regex = Regexp.new("(? e
raise RuntimeError, e.message, e.backtrace
end
end
if encoding
begin
Encoding.find(encoding)
rescue ArgumentError
raise "dumped string has unknown encoding name"
end
result = result.force_encoding(encoding)
end
result
end
end
end
backports-3.16.0/lib/backports/2.5.0/struct.rb 0000664 0000000 0000000 00000000117 13617065163 0020651 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.5.0/struct/ 0000775 0000000 0000000 00000000000 13617065163 0020325 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.5.0/struct/new.rb 0000664 0000000 0000000 00000001415 13617065163 0021444 0 ustar 00root root 0000000 0000000 if RUBY_VERSION >= '2.0.0' && (Struct.new(:a, :keyword_init => true) && false rescue true)
require 'backports/tools/alias_method_chain'
eval %q[
class << Struct
def new_with_keyword_init(*members, keyword_init: false, &block)
klass = new_without_keyword_init(*members)
if keyword_init
members.shift unless members.first.is_a?(Symbol)
arg_list = members.map { |m| "#{m}: nil"}.join(', ')
setter = members.map { |m| "self.#{m} = #{m} " }.join("\n")
klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1
def initialize(#{arg_list})
#{setter}
end
RUBY
end
klass.class_eval(&block) if block
klass
end
Backports.alias_method_chain(self, :new, :keyword_init)
end
]
end
backports-3.16.0/lib/backports/2.5.rb 0000664 0000000 0000000 00000000136 13617065163 0017170 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.4 and below
require 'backports/2.5.0'
backports-3.16.0/lib/backports/2.6.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017330 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.5
require 'backports/2.5'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/ 0000775 0000000 0000000 00000000000 13617065163 0017002 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020444 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020120 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/array/difference.rb 0000664 0000000 0000000 00000000271 13617065163 0022537 0 ustar 00root root 0000000 0000000 class Array
unless method_defined? :difference
require 'backports/1.8.7/enumerable/inject'
def difference(*arrays)
arrays.inject(Array.new(self), :-)
end
end
end
backports-3.16.0/lib/backports/2.6.0/array/to_h.rb 0000664 0000000 0000000 00000000557 13617065163 0021405 0 ustar 00root root 0000000 0000000 require 'backports/2.1.0/array/to_h' unless Array.method_defined? :to_h
if [[:need, true]].to_h { [:need, false] } [:need]
require 'backports/tools/alias_method_chain'
class Array
def to_h_with_block(&block)
receiver = block ? map(&block) : self
receiver.to_h_without_block
end
Backports.alias_method_chain self, :to_h, :block
end
end
backports-3.16.0/lib/backports/2.6.0/array/union.rb 0000664 0000000 0000000 00000000154 13617065163 0021575 0 ustar 00root root 0000000 0000000 class Array
def union(*arrays)
[self, *arrays].inject([], :|)
end unless method_defined? :union
end
backports-3.16.0/lib/backports/2.6.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021445 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021121 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/enumerable/chain.rb 0000664 0000000 0000000 00000001751 13617065163 0022534 0 ustar 00root root 0000000 0000000 unless Enumerable.method_defined? :chain
module Enumerable
def chain(*enums)
Enumerator::Chain.new(self, *enums)
end
end
Enumerator = Enumerable::Enumerator unless Object.const_defined? :Enumerator # For 1.8.x
class Enumerator::Chain < Enumerator
def initialize(*enums)
@enums = enums
@rewindable = -1
self
end
def each(*args, &block)
@enums.each_with_index do |enum, i|
@rewindable = i
enum.each(*args, &block)
end
end
def size
sum = 0
@enums.each do |enum|
s = enum.size
return s if s == nil || s == Float::INFINITY
sum += s
end
sum
end
def inspect
detail = @enums.map(&:inspect).join(', ')
"#"
end
def rewind
@rewindable.downto(0) do |i|
enum = @enums[i]
enum.rewind if enum.respond_to? :rewind
end
self
end
end unless Enumerator.const_defined? :Chain
end
backports-3.16.0/lib/backports/2.6.0/enumerable/to_h.rb 0000664 0000000 0000000 00000000700 13617065163 0022374 0 ustar 00root root 0000000 0000000 require 'backports/2.1.0/enumerable/to_h' unless Enumerable.method_defined? :to_h
if Enumerable.instance_method(:to_h).bind([[:need, true]]).call { [:need, false] } [:need]
require 'backports/tools/alias_method_chain'
module Enumerable
def to_h_with_block(*args, &block)
return to_h_without_block(*args) unless block
map(*args, &block).to_h_without_block
end
Backports.alias_method_chain self, :to_h, :block
end
end
backports-3.16.0/lib/backports/2.6.0/hash.rb 0000664 0000000 0000000 00000000117 13617065163 0020251 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/hash/ 0000775 0000000 0000000 00000000000 13617065163 0017725 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/hash/merge.rb 0000664 0000000 0000000 00000001371 13617065163 0021353 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method_chain'
class Hash
unless instance_method(:merge).arity < 0
def merge_with_backports(first = {}, *others, &block)
merge_without_backports(first, &block).
merge!(*others, &block)
end
Backports.alias_method_chain self, :merge, :backports
end
unless instance_method(:merge!).arity < 0
def merge_with_backports!(*hashes, &block)
hashes.each do |h|
merge_without_backports!(h, &block)
end
self
end
Backports.alias_method_chain self, :merge!, :backports
end
unless instance_method(:update).arity < 0
require 'backports/tools/suppress_verbose_warnings'
Backports.suppress_verbose_warnings do
alias_method :update, :merge!
end
end
end
backports-3.16.0/lib/backports/2.6.0/hash/to_h.rb 0000664 0000000 0000000 00000000574 13617065163 0021211 0 ustar 00root root 0000000 0000000 require 'backports/2.0.0/hash/to_h' unless Hash.method_defined? :to_h
if {:n => true}.to_h{[:ok, true]}[:n]
require 'backports/tools/alias_method_chain'
require 'backports/2.1.0/array/to_h'
class Hash
def to_h_with_block(&block)
return to_h_without_block unless block
map(&block).to_h
end
Backports.alias_method_chain self, :to_h, :block
end
end
backports-3.16.0/lib/backports/2.6.0/hash/update.rb 0000664 0000000 0000000 00000000045 13617065163 0021533 0 ustar 00root root 0000000 0000000 require 'backports/2.6.0/hash/merge'
backports-3.16.0/lib/backports/2.6.0/kernel.rb 0000664 0000000 0000000 00000000117 13617065163 0020606 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/kernel/ 0000775 0000000 0000000 00000000000 13617065163 0020262 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/kernel/then.rb 0000664 0000000 0000000 00000000221 13617065163 0021540 0 ustar 00root root 0000000 0000000 unless Kernel.method_defined? :then
require 'backports/2.5.0/kernel/yield_self'
module Kernel
alias_method :then, :yield_self
end
end
backports-3.16.0/lib/backports/2.6.0/method.rb 0000664 0000000 0000000 00000000117 13617065163 0020606 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/method/ 0000775 0000000 0000000 00000000000 13617065163 0020262 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/method/compose.rb 0000664 0000000 0000000 00000000330 13617065163 0022250 0 ustar 00root root 0000000 0000000 unless Method.method_defined?(:<<) || Method.method_defined?(:>>)
require 'backports/2.6.0/proc/compose'
class Method
def <<(g)
to_proc << g
end
def >>(g)
to_proc >> g
end
end
end
backports-3.16.0/lib/backports/2.6.0/proc.rb 0000664 0000000 0000000 00000000117 13617065163 0020271 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.6.0/proc/ 0000775 0000000 0000000 00000000000 13617065163 0017745 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.6.0/proc/compose.rb 0000664 0000000 0000000 00000000666 13617065163 0021747 0 ustar 00root root 0000000 0000000 unless Proc.method_defined?(:<<) || Proc.method_defined?(:>>)
class Proc
def <<(g)
if lambda?
lambda { |*args, &blk| call(g.call(*args, &blk)) }
else
proc { |*args, &blk| call(g.call(*args, &blk)) }
end
end
def >>(g)
if lambda?
lambda { |*args, &blk| g.call(call(*args, &blk)) }
else
proc { |*args, &blk| g.call(call(*args, &blk)) }
end
end
end
end
backports-3.16.0/lib/backports/2.6.rb 0000664 0000000 0000000 00000000136 13617065163 0017171 0 ustar 00root root 0000000 0000000 # require this file to load all the backports of Ruby 2.4 and below
require 'backports/2.6.0'
backports-3.16.0/lib/backports/2.7.0.rb 0000664 0000000 0000000 00000000164 13617065163 0017331 0 ustar 00root root 0000000 0000000 # require this file to load all the backports up to Ruby 2.5
require 'backports/2.6'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/ 0000775 0000000 0000000 00000000000 13617065163 0017003 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/array.rb 0000664 0000000 0000000 00000000117 13617065163 0020445 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/array/ 0000775 0000000 0000000 00000000000 13617065163 0020121 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/array/intersection.rb 0000664 0000000 0000000 00000000325 13617065163 0023154 0 ustar 00root root 0000000 0000000 require 'backports/1.8.7/enumerable/inject' unless Enumerable.method_defined? :inject
class Array
def intersection(*arrays)
arrays.inject(Array.new(self), :&)
end unless method_defined? :intersection
end
backports-3.16.0/lib/backports/2.7.0/comparable.rb 0000664 0000000 0000000 00000000117 13617065163 0021434 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/comparable/ 0000775 0000000 0000000 00000000000 13617065163 0021110 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/comparable/clamp.rb 0000664 0000000 0000000 00000001575 13617065163 0022541 0 ustar 00root root 0000000 0000000 require 'backports/2.4.0/comparable/clamp' unless Comparable.method_defined? :clamp
if Comparable.instance_method(:clamp).arity == 2
require 'backports/tools/alias_method_chain'
require 'backports/tools/arguments'
module Comparable
def clamp_with_range(range_or_min, max = Backports::Undefined)
return clamp_without_range(range_or_min, max) unless max == Backports::Undefined
raise TypeError, "wrong argument type #{range_or_min.class} (expected Range)" unless range_or_min.is_a?(Range)
if range_or_min.end.nil? # 2.6's endless range
self < range_or_min.begin ? range_or_min.begin : self
elsif range_or_min.exclude_end?
raise ArgumentError, 'cannot clamp with an exclusive range'
else
clamp_without_range(range_or_min.begin, range_or_min.end)
end
end
Backports.alias_method_chain self, :clamp, :range
end
end
backports-3.16.0/lib/backports/2.7.0/complex.rb 0000664 0000000 0000000 00000000117 13617065163 0020776 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/complex/ 0000775 0000000 0000000 00000000000 13617065163 0020452 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/complex/comparision.rb 0000664 0000000 0000000 00000000407 13617065163 0023323 0 ustar 00root root 0000000 0000000 unless Complex.method_defined?(:<=>)
class Complex
def <=>(other)
return nil unless imaginary.zero?
if other.is_a?(Complex)
other.imaginary.zero? ? real <=> other.real : nil
else
real <=> other
end
end
end
end
backports-3.16.0/lib/backports/2.7.0/enumerable.rb 0000664 0000000 0000000 00000000117 13617065163 0021446 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/enumerable/ 0000775 0000000 0000000 00000000000 13617065163 0021122 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/enumerable/filter_map.rb 0000664 0000000 0000000 00000000600 13617065163 0023565 0 ustar 00root root 0000000 0000000 require 'backports/1.9.1/enumerable/each_with_object' unless Enumerable.method_defined? :each_with_object
unless Enumerable.method_defined? :filter_map
module Enumerable
def filter_map
return to_enum(:filter_map) unless block_given?
each_with_object([]) { |item, res|
processed = yield(item)
res << processed if processed
}
end
end
end
backports-3.16.0/lib/backports/2.7.0/enumerable/tally.rb 0000664 0000000 0000000 00000000542 13617065163 0022575 0 ustar 00root root 0000000 0000000 require 'backports/1.9.1/enumerable/each_with_object' unless Enumerable.method_defined? :each_with_object
unless Enumerable.method_defined? :tally
module Enumerable
def tally
# NB: By spec, tally should return default-less hash
each_with_object(Hash.new(0)) { |item, res| res[item] += 1 }.tap { |h| h.default = nil }
end
end
end
backports-3.16.0/lib/backports/2.7.0/enumerator.rb 0000664 0000000 0000000 00000000117 13617065163 0021510 0 ustar 00root root 0000000 0000000 require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/2.7.0/enumerator/ 0000775 0000000 0000000 00000000000 13617065163 0021164 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/enumerator/produce.rb 0000664 0000000 0000000 00000000767 13617065163 0023164 0 ustar 00root root 0000000 0000000 Enumerator = Enumerable::Enumerator unless Object.const_defined? :Enumerator # For 1.8.x
unless Enumerator.respond_to?(:produce)
require 'backports/tools/arguments'
class Enumerator
def self.produce(initial = Backports::Undefined)
raise ArgumentError, 'no block given' unless block_given?
Enumerator.new do |y|
val = initial == Backports::Undefined ? yield() : initial
loop do
y << val
val = yield(val)
end
end
end
end
end
backports-3.16.0/lib/backports/2.7.0/time/ 0000775 0000000 0000000 00000000000 13617065163 0017741 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/2.7.0/time/ceil.rb 0000664 0000000 0000000 00000000422 13617065163 0021200 0 ustar 00root root 0000000 0000000 unless Time.method_defined?(:ceil)
class Time
def ceil(ndigits = 0)
# Imitate value.ceil(ndigits) which does not exist in Ruby < 2.4
sceil = (subsec * 10**ndigits).ceil.to_r / 10**ndigits
change = sceil - subsec
self + change
end
end
end
backports-3.16.0/lib/backports/2.7.0/time/floor.rb 0000664 0000000 0000000 00000000207 13617065163 0021406 0 ustar 00root root 0000000 0000000 unless Time.method_defined?(:floor)
class Time
def floor(ndigits = 0)
self - subsec.modulo(10**-ndigits)
end
end
end
backports-3.16.0/lib/backports/2.7.rb 0000664 0000000 0000000 00000000032 13617065163 0017165 0 ustar 00root root 0000000 0000000 require 'backports/2.7.0'
backports-3.16.0/lib/backports/basic_object.rb 0000664 0000000 0000000 00000003770 13617065163 0021302 0 ustar 00root root 0000000 0000000 # Note: Must be required explicitely!
# This is a best attempt to fake BasicObject in Ruby 1.8.x
# What you do get:
# * as few methods as the real BasicObject (at the moment the library is required...)
# * BasicObject === # ==> returns true
# What you don't get:
# * BasicObject is not in the ancestor list of all classes and thus
# * Comparisons between classes won't work, e.g.
# Object < BasicObject # ==> returns true instead of false
# * Instance methods added to Object or Kernel after you require 'backports/basic_object'
# might also be available in instances of BasicObject and subclasses
# (they will only be undefined whenever a subclass of BasicObject is created)
# Because of all the fineprint, BasicObject must be required explicitely
unless Object.const_defined? :BasicObject
class BasicObject
KEEP = %w[== equal? ! != instance_eval instance_exec __send__]
KEEP.concat KEEP.map { |e| e.to_sym }
# undefine almost all instance methods
begin
old_verbose, $VERBOSE = $VERBOSE, nil # silence the warning for undefining __id__
(instance_methods - KEEP).each do |method|
undef_method method
end
ensure
$VERBOSE = old_verbose
end
class << self
def === (cmp)
true
end
# Let's try to keep things clean, in case methods have been added to Object
# either directly or through an included module.
# We'll do this whenever a class is derived from BasicObject
# Ideally, we'd do this by trapping Object.method_added
# and M.method_added for any module M included in Object or a submodule
# Seems really though to get right, but pull requests welcome ;-)
def inherited(sub)
BasicObject.class_eval do
(instance_methods - KEEP).each do |method|
if Object.method_defined?(method) && instance_method(method).owner == Object.instance_method(method).owner
undef_method method
end
end
end
end
end
end
end
backports-3.16.0/lib/backports/force/ 0000775 0000000 0000000 00000000000 13617065163 0017435 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/force/array_map.rb 0000664 0000000 0000000 00000000051 13617065163 0021731 0 ustar 00root root 0000000 0000000 require 'backports/force/enumerable_map'
backports-3.16.0/lib/backports/force/enumerable_map.rb 0000664 0000000 0000000 00000000256 13617065163 0022741 0 ustar 00root root 0000000 0000000 require 'backports/tools/make_block_optional'
Backports.make_block_optional Enumerable, :map, :test_on => 1..2
Backports.make_block_optional Array, :map, :test_on => [1, 2]
backports-3.16.0/lib/backports/force/hash_select.rb 0000664 0000000 0000000 00000000454 13617065163 0022247 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method_chain'
class Hash
if {}.select{} == []
def select_with_hash_return
return to_enum(:select) unless block_given?
Hash[select_without_hash_return{|k, v| yield [k, v]}]
end
Backports.alias_method_chain self, :select, :hash_return
end
end
backports-3.16.0/lib/backports/force/string_length.rb 0000664 0000000 0000000 00000000264 13617065163 0022633 0 ustar 00root root 0000000 0000000 # encoding: utf-8
class String
if "é".length > 1 && "é".scan(/./).length == 1
def length
unpack("U*").length
end
alias_method :size, :length
end
end
backports-3.16.0/lib/backports/force/string_size.rb 0000664 0000000 0000000 00000000050 13617065163 0022315 0 ustar 00root root 0000000 0000000 require 'backports/force/string_length'
backports-3.16.0/lib/backports/latest.rb 0000664 0000000 0000000 00000000233 13617065163 0020156 0 ustar 00root root 0000000 0000000 # require this file to load all the backports
# NOTE: This is NOT recommended.
# Best to require the specific backports you need
require 'backports/2.7.0'
backports-3.16.0/lib/backports/rails.rb 0000664 0000000 0000000 00000000144 13617065163 0017775 0 ustar 00root root 0000000 0000000 %w(array enumerable hash kernel module string).each do |lib|
require "backports/rails/#{lib}"
end
backports-3.16.0/lib/backports/rails/ 0000775 0000000 0000000 00000000000 13617065163 0017451 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/rails/array.rb 0000664 0000000 0000000 00000000362 13617065163 0021115 0 ustar 00root root 0000000 0000000 class Array
# See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Array/ExtractOptions.html]
def extract_options!
last.is_a?(::Hash) ? pop : {}
end unless method_defined? :extract_options!
end
backports-3.16.0/lib/backports/rails/enumerable.rb 0000664 0000000 0000000 00000000560 13617065163 0022116 0 ustar 00root root 0000000 0000000 module Enumerable
# Standard in rails... See official documentation[http://api.rubyonrails.org/classes/Enumerable.html]
# Modified from rails 2.3 to not rely on size
def sum(identity = 0, &block)
if block_given?
map(&block).sum(identity)
else
inject { |sum, element| sum + element } || identity
end
end unless method_defined? :sum
end
backports-3.16.0/lib/backports/rails/hash.rb 0000664 0000000 0000000 00000002706 13617065163 0020726 0 ustar 00root root 0000000 0000000 class Hash
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def reverse_merge(other_hash)
other_hash.merge(self)
end unless method_defined? :reverse_merge
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def reverse_merge!(other_hash)
replace(reverse_merge(other_hash))
end unless method_defined? :reverse_merge!
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def symbolize_keys
Hash[map{|key,value| [(key.to_sym rescue key) || key, value] }]
end unless method_defined? :symbolize_keys
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def symbolize_keys!
self.replace(self.symbolize_keys)
end unless method_defined? :symbolize_keys!
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def stringify_keys
Hash[map{|key,value| [key.to_s, value] }]
end unless method_defined? :stringify_keys
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Hash/Keys.html]
def stringify_keys!
self.replace(self.stringify_keys)
end unless method_defined? :stringify_keys!
end
backports-3.16.0/lib/backports/rails/kernel.rb 0000664 0000000 0000000 00000000704 13617065163 0021257 0 ustar 00root root 0000000 0000000 # frozen_string_literal: true
# From ActiveSupport
unless Object.method_defined? :try
class Object
def try(*a, &b)
if a.empty? || respond_to?(a.first)
if a.empty? && block_given?
if b.arity == 0
instance_eval(&b)
else
yield self
end
else
public_send(*a, &b)
end
end
end
end
class NilClass
def try(*args)
nil
end
end
end
backports-3.16.0/lib/backports/rails/module.rb 0000664 0000000 0000000 00000000465 13617065163 0021270 0 ustar 00root root 0000000 0000000 class Module
# Standard in rails... See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/Module.html]
def alias_method_chain(target, feature, &block)
Backports.alias_method_chain(self, target, feature, &block)
end unless method_defined? :alias_method_chain
end
backports-3.16.0/lib/backports/rails/string.rb 0000664 0000000 0000000 00000003131 13617065163 0021302 0 ustar 00root root 0000000 0000000 class String
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def camelize(first_letter = :upper)
if first_letter == :upper
gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase }
else
self[0..0].downcase + camelize[1..-1]
end
end unless method_defined? :camelize
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def constantize
names = split('::')
names.shift if names.empty? || names.first.empty?
constant = Object
names.each do |name|
constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
end
constant
end unless method_defined? :constantize
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def dasherize
gsub(/_/, '-')
end unless method_defined? :dasherize
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def demodulize
gsub(/^.*::/, '')
end unless method_defined? :demodulize
# Standard in rails. See official documentation[http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Inflections.html]
def underscore
gsub(/::/, '/').
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
gsub(/([a-z\d])([A-Z])/,'\1_\2').
tr("-", "_").
downcase
end unless method_defined? :underscore
end
backports-3.16.0/lib/backports/random/ 0000775 0000000 0000000 00000000000 13617065163 0017617 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/random/MT19937.rb 0000664 0000000 0000000 00000004514 13617065163 0021105 0 ustar 00root root 0000000 0000000 module Backports
class Random
# An implementation of Mersenne Twister MT19937 in Ruby
class MT19937
STATE_SIZE = 624
LAST_STATE = STATE_SIZE - 1
PAD_32_BITS = 0xffffffff
# See seed=
def initialize(seed)
self.seed = seed
end
LAST_31_BITS = 0x7fffffff
OFFSET = 397
# Generates a completely new state out of the previous one.
def next_state
STATE_SIZE.times do |i|
mix = @state[i] & 0x80000000 | @state[i+1 - STATE_SIZE] & 0x7fffffff
@state[i] = @state[i+OFFSET - STATE_SIZE] ^ (mix >> 1)
@state[i] ^= 0x9908b0df if mix.odd?
end
@last_read = -1
end
# Seed must be either an Integer (only the first 32 bits will be used)
# or an Array of Integers (of which only the first 32 bits will be used)
#
# No conversion or type checking is done at this level
def seed=(seed)
case seed
when Integer
@state = Array.new(STATE_SIZE)
@state[0] = seed & PAD_32_BITS
(1..LAST_STATE).each do |i|
@state[i] = (1812433253 * (@state[i-1] ^ @state[i-1]>>30) + i)& PAD_32_BITS
end
@last_read = LAST_STATE
when Array
self.seed = 19650218
i=1
j=0
[STATE_SIZE, seed.size].max.times do
@state[i] = (@state[i] ^ (@state[i-1] ^ @state[i-1]>>30) * 1664525) + j + seed[j] & PAD_32_BITS
if (i+=1) >= STATE_SIZE
@state[0] = @state[-1]
i = 1
end
j = 0 if (j+=1) >= seed.size
end
(STATE_SIZE-1).times do
@state[i] = (@state[i] ^ (@state[i-1] ^ @state[i-1]>>30) * 1566083941) - i & PAD_32_BITS
if (i+=1) >= STATE_SIZE
@state[0] = @state[-1]
i = 1
end
end
@state[0] = 0x80000000
else
raise ArgumentError, "Seed must be an Integer or an Array"
end
end
# Returns a random Integer from the range 0 ... (1 << 32)
def random_32_bits
next_state if @last_read >= LAST_STATE
@last_read += 1
y = @state[@last_read]
# Tempering
y ^= (y >> 11)
y ^= (y << 7) & 0x9d2c5680
y ^= (y << 15) & 0xefc60000
y ^= (y >> 18)
end
end
end
end
backports-3.16.0/lib/backports/random/bits_and_bytes.rb 0000664 0000000 0000000 00000004512 13617065163 0023137 0 ustar 00root root 0000000 0000000 module Backports
class Random
# Supplement the MT19937 class with methods to do
# conversions the same way as MRI.
# No argument checking is done here either.
class MT19937
FLOAT_FACTOR = 1.0/9007199254740992.0
# generates a random number on [0,1) with 53-bit resolution
def random_float
((random_32_bits >> 5) * 67108864.0 + (random_32_bits >> 6)) * FLOAT_FACTOR;
end
# Returns an integer within 0...upto
def random_integer(upto)
n = upto - 1
nb_full_32 = 0
while n > PAD_32_BITS
n >>= 32
nb_full_32 += 1
end
mask = mask_32_bits(n)
begin
rand = random_32_bits & mask
nb_full_32.times do
rand <<= 32
rand |= random_32_bits
end
end until rand < upto
rand
end
def random_bytes(nb)
nb_32_bits = (nb + 3) / 4
random = nb_32_bits.times.map { random_32_bits }
random.pack("L" * nb_32_bits)[0, nb]
end
def state_as_bignum
b = 0
@state.each_with_index do |val, i|
b |= val << (32 * i)
end
b
end
def left # It's actually the number of words left + 1, as per MRI...
MT19937::STATE_SIZE - @last_read
end
def marshal_dump
[state_as_bignum, left]
end
def marshal_load(ary)
b, left = ary
@last_read = MT19937::STATE_SIZE - left
@state = Array.new(STATE_SIZE)
STATE_SIZE.times do |i|
@state[i] = b & PAD_32_BITS
b >>= 32
end
end
# Convert an Integer seed of arbitrary size to either a single 32 bit integer, or an Array of 32 bit integers
def self.convert_seed(seed)
seed = seed.abs
long_values = []
begin
long_values << (seed & PAD_32_BITS)
seed >>= 32
end until seed == 0
long_values.pop if long_values[-1] == 1 && long_values.size > 1 # Done to allow any kind of sequence of integers
long_values.size > 1 ? long_values : long_values.first
end
def self.[](seed)
new(convert_seed(seed))
end
private
MASK_BY = [1,2,4,8,16]
def mask_32_bits(n)
MASK_BY.each do |shift|
n |= n >> shift
end
n
end
end
end
end
backports-3.16.0/lib/backports/random/implementation.rb 0000664 0000000 0000000 00000005056 13617065163 0023177 0 ustar 00root root 0000000 0000000 require "backports/tools/arguments"
require "backports/random/MT19937"
require "backports/random/bits_and_bytes"
module Backports
class Random
# Implementation corresponding to the actual Random class of Ruby
# The actual random generator (mersenne twister) is in MT19937.
# Ruby specific conversions are handled in bits_and_bytes.
# The high level stuff (argument checking) is done here.
#
module Implementation
attr_reader :seed
def initialize(seed = 0)
super()
srand(seed)
end
def srand(new_seed = 0)
new_seed = Backports.coerce_to_int(new_seed)
old, @seed = @seed, new_seed.nonzero? || ::Random.new_seed
@mt = MT19937[ @seed ]
old
end
def rand(limit = Backports::Undefined)
case limit
when Backports::Undefined
@mt.random_float
when Float
limit * @mt.random_float unless limit <= 0
when Range
_rand_range(limit)
else
limit = Backports.coerce_to_int(limit)
@mt.random_integer(limit) unless limit <= 0
end || raise(ArgumentError, "invalid argument #{limit}")
end
def bytes(nb)
nb = Backports.coerce_to_int(nb)
raise ArgumentError, "negative size" if nb < 0
@mt.random_bytes(nb)
end
def ==(other)
other.is_a?(::Random) &&
seed == other.seed &&
left == other.send(:left) &&
state == other.send(:state)
end
def marshal_dump
@mt.marshal_dump << @seed
end
def marshal_load(ary)
@seed = ary.pop
@mt = MT19937.allocate
@mt.marshal_load(ary)
end
private
def state
@mt.state_as_bignum
end
def left
@mt.left
end
def _rand_range(limit)
range = limit.end - limit.begin
if (!range.is_a?(Float)) && range.respond_to?(:to_int) && range = Backports.coerce_to_int(range)
range += 1 unless limit.exclude_end?
limit.begin + @mt.random_integer(range) unless range <= 0
elsif range = Backports.coerce_to(range, Float, :to_f)
if range < 0
nil
elsif limit.exclude_end?
limit.begin + @mt.random_float * range unless range <= 0
else
# cheat a bit... this will reduce the nb of random bits
loop do
r = @mt.random_float * range * 1.0001
break limit.begin + r unless r > range
end
end
end
end
end
end
end
backports-3.16.0/lib/backports/random/load.rb 0000664 0000000 0000000 00000000527 13617065163 0021067 0 ustar 00root root 0000000 0000000 require "backports/random/implementation"
class Random
include Backports::Random::Implementation
extend Backports::Random::Implementation
def self.new_seed
Kernel::srand # use the built-in seed generator
Kernel::srand # return the generated seed
end
def inspect
"#<#{self.class.name}:#{object_id}>"
end
srand
end
backports-3.16.0/lib/backports/std_lib.rb 0000664 0000000 0000000 00000001407 13617065163 0020306 0 ustar 00root root 0000000 0000000 # Will intercept future and past 'require' calls of std_lib
# and load additionally the updated libraries.
require 'backports/tools/std_lib'
require 'backports/tools/alias_method_chain'
module Kernel
def require_with_backports(lib)
begin
return false unless require_without_backports(lib)
paths = Backports::StdLib.extended_lib.fetch(lib, nil)
rescue LoadError
return false if Backports::StdLib::LoadedFeatures.new.include?(lib)
raise unless paths = Backports::StdLib.extended_lib.fetch(lib, nil)
Backports::StdLib::LoadedFeatures.mark_as_loaded(lib)
end
if paths
paths.each do |path|
require_without_backports(path)
end
end
true
end
Backports.alias_method_chain self, :require, :backports
end
backports-3.16.0/lib/backports/tools.rb 0000664 0000000 0000000 00000000172 13617065163 0020024 0 ustar 00root root 0000000 0000000 # Methods used internally by the backports.
require 'backports/tools/require_relative_dir'
Backports.require_relative_dir
backports-3.16.0/lib/backports/tools/ 0000775 0000000 0000000 00000000000 13617065163 0017477 5 ustar 00root root 0000000 0000000 backports-3.16.0/lib/backports/tools/alias_method.rb 0000664 0000000 0000000 00000000456 13617065163 0022462 0 ustar 00root root 0000000 0000000 module Backports
# Safe alias_method that will only alias if the source exists and destination doesn't
def self.alias_method(mod, new_name, old_name)
mod.instance_eval do
alias_method new_name, old_name
end if mod.method_defined?(old_name) && !mod.method_defined?(new_name)
end
end
backports-3.16.0/lib/backports/tools/alias_method_chain.rb 0000664 0000000 0000000 00000001614 13617065163 0023621 0 ustar 00root root 0000000 0000000 module Backports
# Modified to avoid polluting Module if so desired
# (from Rails)
def self.alias_method_chain(mod, target, feature)
mod.class_eval do
# Strip out punctuation on predicates or bang methods since
# e.g. target?_without_feature is not a valid method name.
aliased_target, punctuation = target.to_s.sub(/([?!=])$/, ''), $1
yield(aliased_target, punctuation) if block_given?
with_method, without_method = "#{aliased_target}_with_#{feature}#{punctuation}", "#{aliased_target}_without_#{feature}#{punctuation}"
alias_method without_method, target
alias_method target, with_method
case
when public_method_defined?(without_method)
public target
when protected_method_defined?(without_method)
protected target
when private_method_defined?(without_method)
private target
end
end
end
end
backports-3.16.0/lib/backports/tools/arguments.rb 0000664 0000000 0000000 00000003657 13617065163 0022044 0 ustar 00root root 0000000 0000000 module Backports
# Helper method to coerce a value into a specific class.
# Raises a TypeError if the coercion fails or the returned value
# is not of the right class.
# (from Rubinius)
def self.coerce_to(obj, cls, meth)
return obj if obj.kind_of?(cls)
begin
ret = obj.__send__(meth)
rescue Exception => e
raise TypeError, "Coercion error: #{obj.inspect}.#{meth} => #{cls} failed:\n" \
"(#{e.message})"
end
raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.kind_of? cls
ret
end
def self.coerce_to_int(obj)
coerce_to(obj, Integer, :to_int)
end
def self.coerce_to_ary(obj)
coerce_to(obj, Array, :to_ary)
end
def self.coerce_to_str(obj)
coerce_to(obj, String, :to_str)
end
def self.coerce_to_hash(obj)
coerce_to(obj, Hash, :to_hash)
end
def self.coerce_to_options(obj, *options)
hash = coerce_to_hash(obj)
hash.values_at(*options)
end
def self.coerce_to_option(obj, option)
coerce_to_options(obj, option)[0]
end
def self.is_array?(obj)
coerce_to(obj, Array, :to_ary) if obj.respond_to? :to_ary
end
def self.try_convert(obj, cls, meth)
return obj if obj.kind_of?(cls)
return nil unless obj.respond_to?(meth)
ret = obj.__send__(meth)
raise TypeError, "Coercion error: obj.#{meth} did NOT return a #{cls} (was #{ret.class})" unless ret.nil? || ret.kind_of?(cls)
ret
end
# Checks for a failed comparison (in which case it throws an ArgumentError)
# Additionally, it maps any negative value to -1 and any positive value to +1
# (from Rubinius)
def self.coerce_to_comparison(a, b, cmp = (a <=> b))
raise ArgumentError, "comparison of #{a} with #{b} failed" if cmp.nil?
return 1 if cmp > 0
return -1 if cmp < 0
0
end
# Used internally to make it easy to deal with optional arguments
# (from Rubinius)
Undefined = Object.new
end
backports-3.16.0/lib/backports/tools/extreme_object.rb 0000664 0000000 0000000 00000000300 13617065163 0023014 0 ustar 00root root 0000000 0000000 module Backports
MOST_EXTREME_OBJECT_EVER = Object.new # :nodoc:
class << MOST_EXTREME_OBJECT_EVER
def <(whatever)
true
end
def >(whatever)
true
end
end
end
backports-3.16.0/lib/backports/tools/float_integer_conversion.rb 0000664 0000000 0000000 00000000530 13617065163 0025111 0 ustar 00root root 0000000 0000000 module Backports
class << self
def float_to_integer(float)
map_via_packing(float, 'D', 'q')
end
def integer_to_float(int)
map_via_packing(int, 'q', 'D')
end
private
def map_via_packing(nb, pack, unpack)
result, = [nb.abs].pack(pack).unpack(unpack)
nb < 0 ? -result : result
end
end
end
backports-3.16.0/lib/backports/tools/io.rb 0000664 0000000 0000000 00000004755 13617065163 0020446 0 ustar 00root root 0000000 0000000 require 'backports/tools/arguments'
module Backports
# Used internally to combine {IO|File} options hash into mode (String or Integer)
def self.combine_mode_and_option(mode = nil, options = Backports::Undefined)
# Can't backport autoclose, {internal|external|}encoding
mode, options = nil, mode if mode.respond_to?(:to_hash) && options == Backports::Undefined
options = {} if options == nil || options == Backports::Undefined
options = coerce_to_hash(options)
if mode && options[:mode]
raise ArgumentError, "mode specified twice"
end
mode ||= options[:mode] || "r"
mode = try_convert(mode, String, :to_str) || try_convert(mode, Integer, :to_int) || mode
if options[:textmode] || options[:binmode]
text = options[:textmode] || (mode.is_a?(String) && mode =~ /t/)
bin = options[:binmode] || (mode.is_a?(String) ? mode =~ /b/ : mode & File::Constants::BINARY != 0)
if text && bin
raise ArgumentError, "both textmode and binmode specified"
end
case
when !options[:binmode]
when mode.is_a?(String)
mode.insert(1, "b")
else
mode |= File::Constants::BINARY
end
end
mode
end
# Used internally to combine {IO|File} options hash into mode (String or Integer) and perm
def self.combine_mode_perm_and_option(mode = nil, perm = Backports::Undefined, options = Backports::Undefined)
mode, options = nil, mode if mode.respond_to?(:to_hash) && perm == Backports::Undefined
perm, options = nil, perm if perm.respond_to?(:to_hash) && options == Backports::Undefined
perm = nil if perm == Backports::Undefined
options = {} if options == Backports::Undefined
options = coerce_to_hash(options)
if perm && options[:perm]
raise ArgumentError, "perm specified twice"
end
[combine_mode_and_option(mode, options), perm || options[:perm]]
end
def self.write(binary, filename, string, offset, options)
offset, options = nil, offset if offset.respond_to?(:to_hash) && options == Backports::Undefined
options = {} if options == Backports::Undefined
options = coerce_to_hash(options)
File.open(filename, 'a+'){} if offset # insure existence
options = {:mode => offset.nil? ? "w" : "r+"}.merge(options)
args = options[:open_args] || [options]
File.open(filename, *Backports.combine_mode_perm_and_option(*args)) do |f|
f.binmode if binary && f.respond_to?(:binmode)
f.seek(offset) unless offset.nil?
f.write(string)
end
end
end
backports-3.16.0/lib/backports/tools/make_block_optional.rb 0000664 0000000 0000000 00000003131 13617065163 0024016 0 ustar 00root root 0000000 0000000 require 'backports/tools/alias_method_chain'
module Backports
# Metaprogramming utility to make block optional.
# Tests first if block is already optional when given options
def self.make_block_optional(mod, *methods)
mod = class << mod; self; end unless mod.is_a? Module
options = methods.last.is_a?(Hash) ? methods.pop : {}
methods.each do |selector|
unless mod.method_defined? selector
warn "#{mod}##{selector} is not defined, so block can't be made optional"
next
end
unless options[:force]
# Check if needed
test_on = options.fetch(:test_on)
result = begin
test_on.send(selector, *options.fetch(:arg, []))
rescue LocalJumpError
false
end
next if result.class.name =~ /Enumerator/
end
require 'enumerator'
arity = mod.instance_method(selector).arity
last_arg = []
if arity < 0
last_arg = ["*rest"]
arity = -1-arity
end
arg_sequence = ((0...arity).map{|i| "arg_#{i}"} + last_arg + ["&block"]).join(", ")
alias_method_chain(mod, selector, :optional_block) do |aliased_target, punctuation|
mod.module_eval <<-end_eval, __FILE__, __LINE__ + 1
def #{aliased_target}_with_optional_block#{punctuation}(#{arg_sequence})
return to_enum(:#{aliased_target}_without_optional_block#{punctuation}, #{arg_sequence}) unless block_given?
#{aliased_target}_without_optional_block#{punctuation}(#{arg_sequence})
end
end_eval
end
end
end
end
backports-3.16.0/lib/backports/tools/normalize.rb 0000664 0000000 0000000 00000552326 13617065163 0022041 0 ustar 00root root 0000000 0000000 # coding: utf-8
# frozen_string_literal: false
# Copied from CRuby.
# Copyright Ayumu Nojima (野島 歩) and Martin J. Dürst (duerst@it.aoyama.ac.jp)
module UnicodeNormalize
accents = "" \
"[\u0300-\u034E\u0350-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7" \
"\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711" \
"\u0730-\u074A\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1" \
"\u08E3-\u08FF\u093C\u094D\u0951-\u0954\u09BC\u09BE\u09CD\u09D7" \
"\u0A3C\u0A4D\u0ABC\u0ACD\u0B3C\u0B3E\u0B4D\u0B56\u0B57" \
"\u0BBE\u0BCD\u0BD7\u0C4D\u0C55\u0C56\u0CBC\u0CC2\u0CCD" \
"\u0CD5\u0CD6\u0D3E\u0D4D\u0D57\u0DCA\u0DCF\u0DDF\u0E38-\u0E3A" \
"\u0E48-\u0E4B\u0EB8\u0EB9\u0EC8-\u0ECB\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71\u0F72" \
"\u0F74\u0F7A-\u0F7D\u0F80\u0F82-\u0F84\u0F86\u0F87\u0FC6\u102E\u1037" \
"\u1039\u103A\u108D\u135D-\u135F\u1714\u1734\u17D2\u17DD\u18A9" \
"\u1939-\u193B\u1A17\u1A18\u1A60\u1A75-\u1A7C\u1A7F\u1AB0-\u1ABD\u1B34\u1B35\u1B44" \
"\u1B6B-\u1B73\u1BAA\u1BAB\u1BE6\u1BF2\u1BF3\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8" \
"\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0" \
"\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F\uA674-\uA67D\uA69E\uA69F" \
"\uA6F0\uA6F1\uA806\uA8C4\uA8E0-\uA8F1\uA92B-\uA92D\uA953\uA9B3\uA9C0" \
"\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAF6\uABED\uFB1E" \
"\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A0D}\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}" \
"\u{10AE5}\u{10AE6}\u{11046}\u{1107F}\u{110B9}\u{110BA}\u{11100}-\u{11102}\u{11127}\u{11133}\u{11134}\u{11173}" \
"\u{111C0}\u{111CA}\u{11235}\u{11236}\u{112E9}\u{112EA}\u{1133C}\u{1133E}\u{1134D}\u{11357}" \
"\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11442}\u{11446}\u{114B0}\u{114BA}\u{114BD}\u{114C2}\u{114C3}" \
"\u{115AF}\u{115BF}\u{115C0}\u{1163F}\u{116B6}\u{116B7}\u{1172B}\u{11C3F}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}" \
"\u{1BC9E}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1E000}-\u{1E006}" \
"\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}" \
"]"
ACCENTS = accents
REGEXP_D_STRING = "#{'' # composition starters and composition exclusions
}" \
"[\u00C0-\u00C5\u00C7-\u00CF\u00D1-\u00D6\u00D9-\u00DD\u00E0-\u00E5\u00E7-\u00EF\u00F1-\u00F6\u00F9-\u00FD" \
"\u00FF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165" \
"\u0168-\u017E\u01A0\u01A1\u01AF\u01B0\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B" \
"\u021E\u021F\u0226-\u0233\u0340\u0341\u0343\u0344\u0374\u037E\u0385-\u038A\u038C" \
"\u038E-\u0390\u03AA-\u03B0\u03CA-\u03CE\u03D3\u03D4\u0400\u0401\u0403\u0407\u040C-\u040E" \
"\u0419\u0439\u0450\u0451\u0453\u0457\u045C-\u045E\u0476\u0477\u04C1\u04C2" \
"\u04D0-\u04D3\u04D6\u04D7\u04DA-\u04DF\u04E2-\u04E7\u04EA-\u04F5\u04F8\u04F9\u0622-\u0626\u06C0" \
"\u06C2\u06D3\u0929\u0931\u0934\u0958-\u095F\u09CB\u09CC\u09DC\u09DD" \
"\u09DF\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B48\u0B4B\u0B4C\u0B5C\u0B5D" \
"\u0B94\u0BCA-\u0BCC\u0C48\u0CC0\u0CC7\u0CC8\u0CCA\u0CCB\u0D4A-\u0D4C\u0DDA" \
"\u0DDC-\u0DDE\u0F43\u0F4D\u0F52\u0F57\u0F5C\u0F69\u0F73" \
"\u0F75\u0F76\u0F78\u0F81\u0F93\u0F9D\u0FA2\u0FA7\u0FAC" \
"\u0FB9\u1026\u1B06\u1B08\u1B0A\u1B0C\u1B0E\u1B12" \
"\u1B3B\u1B3D\u1B40\u1B41\u1B43\u1E00-\u1E99\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15" \
"\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D" \
"\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC1-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4" \
"\u1FF6-\u1FFD\u2000\u2001\u2126\u212A\u212B\u219A\u219B\u21AE\u21CD-\u21CF\u2204" \
"\u2209\u220C\u2224\u2226\u2241\u2244\u2247\u2249" \
"\u2260\u2262\u226D-\u2271\u2274\u2275\u2278\u2279\u2280\u2281\u2284\u2285\u2288\u2289" \
"\u22AC-\u22AF\u22E0-\u22E3\u22EA-\u22ED\u2329\u232A\u2ADC\u304C\u304E\u3050" \
"\u3052\u3054\u3056\u3058\u305A\u305C\u305E\u3060" \
"\u3062\u3065\u3067\u3069\u3070\u3071\u3073\u3074\u3076\u3077\u3079\u307A" \
"\u307C\u307D\u3094\u309E\u30AC\u30AE\u30B0\u30B2\u30B4" \
"\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5" \
"\u30C7\u30C9\u30D0\u30D1\u30D3\u30D4\u30D6\u30D7\u30D9\u30DA\u30DC\u30DD\u30F4" \
"\u30F7-\u30FA\u30FE\uF900-\uFA0D\uFA10\uFA12\uFA15-\uFA1E\uFA20\uFA22" \
"\uFA25\uFA26\uFA2A-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E" \
"\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E\u{1109A}\u{1109C}\u{110AB}\u{1112E}\u{1112F}\u{1134B}\u{1134C}" \
"\u{114BB}\u{114BC}\u{114BE}\u{115BA}\u{115BB}\u{1D15E}-\u{1D164}\u{1D1BB}-\u{1D1C0}\u{2F800}-\u{2FA1D}" \
"]#{accents}*" \
"|#{'' # characters that can be the result of a composition, except composition starters
}" \
"[<->A-PR-Za-pr-z\u00A8\u00C6\u00D8" \
"\u00E6\u00F8\u017F\u01B7\u0292\u0391\u0395\u0397" \
"\u0399\u039F\u03A1\u03A5\u03A9\u03B1\u03B5\u03B7" \
"\u03B9\u03BF\u03C1\u03C5\u03C9\u03D2\u0406\u0410" \
"\u0413\u0415-\u0418\u041A\u041E\u0423\u0427\u042B\u042D" \
"\u0430\u0433\u0435-\u0438\u043A\u043E\u0443\u0447\u044B" \
"\u044D\u0456\u0474\u0475\u04D8\u04D9\u04E8\u04E9\u0627\u0648\u064A" \
"\u06C1\u06D2\u06D5\u0928\u0930\u0933\u09C7\u0B47" \
"\u0B92\u0BC6\u0BC7\u0C46\u0CBF\u0CC6\u0D46\u0D47\u0DD9\u1025" \
"\u1B05\u1B07\u1B09\u1B0B\u1B0D\u1B11\u1B3A\u1B3C" \
"\u1B3E\u1B3F\u1B42\u1FBF\u1FFE\u2190\u2192\u2194\u21D0" \
"\u21D2\u21D4\u2203\u2208\u220B\u2223\u2225\u223C" \
"\u2243\u2245\u2248\u224D\u2261\u2264\u2265\u2272\u2273\u2276\u2277" \
"\u227A-\u227D\u2282\u2283\u2286\u2287\u2291\u2292\u22A2\u22A8\u22A9\u22AB\u22B2-\u22B5" \
"\u3046\u304B\u304D\u304F\u3051\u3053\u3055\u3057" \
"\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068" \
"\u306F\u3072\u3075\u3078\u307B\u309D\u30A6\u30AB" \
"\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB" \
"\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CF\u30D2" \
"\u30D5\u30D8\u30DB\u30EF-\u30F2\u30FD\u{11099}\u{1109B}\u{110A5}" \
"\u{11131}\u{11132}\u{11347}\u{114B9}\u{115B8}\u{115B9}" \
"]?#{accents}+" \
"|#{'' # precomposed Hangul syllables
}" \
"[\u{AC00}-\u{D7A4}]"
REGEXP_C_STRING = "#{'' # composition exclusions
}" \
"[\u0340\u0341\u0343\u0344\u0374\u037E\u0387\u0958-\u095F\u09DC\u09DD\u09DF" \
"\u0A33\u0A36\u0A59-\u0A5B\u0A5E\u0B5C\u0B5D\u0F43\u0F4D\u0F52" \
"\u0F57\u0F5C\u0F69\u0F73\u0F75\u0F76\u0F78\u0F81\u0F93" \
"\u0F9D\u0FA2\u0FA7\u0FAC\u0FB9\u1F71\u1F73\u1F75" \
"\u1F77\u1F79\u1F7B\u1F7D\u1FBB\u1FBE\u1FC9\u1FCB" \
"\u1FD3\u1FDB\u1FE3\u1FEB\u1FEE\u1FEF\u1FF9\u1FFB\u1FFD" \
"\u2000\u2001\u2126\u212A\u212B\u2329\u232A\u2ADC\uF900-\uFA0D\uFA10\uFA12" \
"\uFA15-\uFA1E\uFA20\uFA22\uFA25\uFA26\uFA2A-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F" \
"\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFB4E\u{1D15E}-\u{1D164}\u{1D1BB}-\u{1D1C0}" \
"\u{2F800}-\u{2FA1D}" \
"]#{accents}*" \
"|#{'' # composition starters and characters that can be the result of a composition
}" \
"[<->A-PR-Za-pr-z\u00A8\u00C0-\u00CF\u00D1-\u00D6" \
"\u00D8-\u00DD\u00E0-\u00EF\u00F1-\u00F6\u00F8-\u00FD\u00FF-\u010F\u0112-\u0125\u0128-\u0130\u0134-\u0137" \
"\u0139-\u013E\u0143-\u0148\u014C-\u0151\u0154-\u0165\u0168-\u017F\u01A0\u01A1\u01AF\u01B0\u01B7" \
"\u01CD-\u01DC\u01DE-\u01E3\u01E6-\u01F0\u01F4\u01F5\u01F8-\u021B\u021E\u021F\u0226-\u0233\u0292" \
"\u0385\u0386\u0388-\u038A\u038C\u038E-\u0391\u0395\u0397\u0399\u039F" \
"\u03A1\u03A5\u03A9-\u03B1\u03B5\u03B7\u03B9\u03BF\u03C1" \
"\u03C5\u03C9-\u03CE\u03D2-\u03D4\u0400\u0401\u0403\u0406\u0407\u040C-\u040E\u0410" \
"\u0413\u0415-\u041A\u041E\u0423\u0427\u042B\u042D\u0430" \
"\u0433\u0435-\u043A\u043E\u0443\u0447\u044B\u044D\u0450\u0451" \
"\u0453\u0456\u0457\u045C-\u045E\u0474-\u0477\u04C1\u04C2\u04D0-\u04D3\u04D6-\u04DF\u04E2-\u04F5" \
"\u04F8\u04F9\u0622-\u0627\u0648\u064A\u06C0-\u06C2\u06D2\u06D3\u06D5\u0928\u0929" \
"\u0930\u0931\u0933\u0934\u09C7\u09CB\u09CC\u0B47\u0B48\u0B4B\u0B4C\u0B92\u0B94" \
"\u0BC6\u0BC7\u0BCA-\u0BCC\u0C46\u0C48\u0CBF\u0CC0\u0CC6-\u0CC8\u0CCA\u0CCB\u0D46\u0D47" \
"\u0D4A-\u0D4C\u0DD9\u0DDA\u0DDC-\u0DDE\u1025\u1026\u1B05-\u1B0E\u1B11\u1B12\u1B3A-\u1B43\u1E00-\u1E99" \
"\u1E9B\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59" \
"\u1F5B\u1F5D\u1F5F-\u1F70\u1F72\u1F74\u1F76\u1F78\u1F7A" \
"\u1F7C\u1F80-\u1FB4\u1FB6-\u1FBA\u1FBC\u1FBF\u1FC1-\u1FC4\u1FC6-\u1FC8\u1FCA" \
"\u1FCC-\u1FD2\u1FD6-\u1FDA\u1FDD-\u1FE2\u1FE4-\u1FEA\u1FEC\u1FED\u1FF2-\u1FF4\u1FF6-\u1FF8\u1FFA" \
"\u1FFC\u1FFE\u2190\u2192\u2194\u219A\u219B\u21AE\u21CD-\u21D0" \
"\u21D2\u21D4\u2203\u2204\u2208\u2209\u220B\u220C\u2223-\u2226\u223C\u2241" \
"\u2243-\u2245\u2247-\u2249\u224D\u2260-\u2262\u2264\u2265\u226D-\u227D\u2280-\u2289\u2291\u2292" \
"\u22A2\u22A8\u22A9\u22AB-\u22AF\u22B2-\u22B5\u22E0-\u22E3\u22EA-\u22ED\u3046\u304B-\u3062" \
"\u3064-\u3069\u306F-\u307D\u3094\u309D\u309E\u30A6\u30AB-\u30C2\u30C4-\u30C9\u30CF-\u30DD" \
"\u30EF-\u30F2\u30F4\u30F7-\u30FA\u30FD\u30FE\u{11099}-\u{1109C}\u{110A5}\u{110AB}\u{1112E}\u{1112F}" \
"\u{11131}\u{11132}\u{11347}\u{1134B}\u{1134C}\u{114B9}\u{114BB}\u{114BC}\u{114BE}\u{115B8}-\u{115BB}" \
"]?#{accents}+" \
"|#{'' # Hangul syllables with separate trailer
}" \
"[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4" \
"\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4" \
"\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84" \
"\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64" \
"\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044" \
"\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124" \
"\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204" \
"\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4" \
"\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4" \
"\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4" \
"\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584" \
"\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664" \
"\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744" \
"\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824" \
"\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904" \
"\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4" \
"\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4" \
"\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4" \
"\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84" \
"\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64" \
"\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44" \
"\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24" \
"\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004" \
"\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4" \
"\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4" \
"\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4" \
"\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384" \
"\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464" \
"\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544" \
"\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624" \
"\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704" \
"\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4" \
"\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4" \
"\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4" \
"\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84" \
"\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64" \
"\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44" \
"\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24" \
"\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04" \
"\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4" \
"\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4" \
"\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4" \
"\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184" \
"\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264" \
"\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344" \
"\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424" \
"\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504" \
"\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4" \
"\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4" \
"\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788" \
"][\u11A8-\u11C2]" \
"|#{'' # decomposed Hangul syllables
}" \
"[\u1100-\u1112][\u1161-\u1175][\u11A8-\u11C2]?"
REGEXP_K_STRING = "" \
"[\u00A0\u00A8\u00AA\u00AF\u00B2-\u00B5\u00B8-\u00BA\u00BC-\u00BE\u0132\u0133" \
"\u013F\u0140\u0149\u017F\u01C4-\u01CC\u01F1-\u01F3\u02B0-\u02B8\u02D8-\u02DD\u02E0-\u02E4" \
"\u037A\u0384\u0385\u03D0-\u03D6\u03F0-\u03F2\u03F4\u03F5\u03F9\u0587\u0675-\u0678" \
"\u0E33\u0EB3\u0EDC\u0EDD\u0F0C\u0F77\u0F79\u10FC\u1D2C-\u1D2E" \
"\u1D30-\u1D3A\u1D3C-\u1D4D\u1D4F-\u1D6A\u1D78\u1D9B-\u1DBF\u1E9A\u1E9B\u1FBD\u1FBF-\u1FC1" \
"\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED\u1FEE\u1FFD\u1FFE\u2000-\u200A\u2011\u2017\u2024-\u2026" \
"\u202F\u2033\u2034\u2036\u2037\u203C\u203E\u2047-\u2049\u2057\u205F" \
"\u2070\u2071\u2074-\u208E\u2090-\u209C\u20A8\u2100-\u2103\u2105-\u2107\u2109-\u2113\u2115\u2116" \
"\u2119-\u211D\u2120-\u2122\u2124\u2128\u212C\u212D\u212F-\u2131\u2133-\u2139\u213B-\u2140" \
"\u2145-\u2149\u2150-\u217F\u2189\u222C\u222D\u222F\u2230\u2460-\u24EA\u2A0C\u2A74-\u2A76" \
"\u2C7C\u2C7D\u2D6F\u2E9F\u2EF3\u2F00-\u2FD5\u3000\u3036\u3038-\u303A" \
"\u309B\u309C\u309F\u30FF\u3131-\u318E\u3192-\u319F\u3200-\u321E\u3220-\u3247\u3250-\u327E" \
"\u3280-\u32FE\u3300-\u33FF\uA69C\uA69D\uA770\uA7F8\uA7F9\uAB5C-\uAB5F\uFB00-\uFB06\uFB13-\uFB17" \
"\uFB20-\uFB29\uFB4F-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE10-\uFE19\uFE30-\uFE44" \
"\uFE47-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE72\uFE74\uFE76-\uFEFC\uFF01-\uFFBE\uFFC2-\uFFC7" \
"\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}" \
"\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}" \
"\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}" \
"\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1D7FF}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}" \
"\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}" \
"\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}" \
"\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}" \
"\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F14F}\u{1F16A}\u{1F16B}\u{1F190}" \
"\u{1F200}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}" \
"]"
class_table = {
"\u0300"=>230, "\u0301"=>230, "\u0302"=>230, "\u0303"=>230, "\u0304"=>230, "\u0305"=>230, "\u0306"=>230, "\u0307"=>230,
"\u0308"=>230, "\u0309"=>230, "\u030A"=>230, "\u030B"=>230, "\u030C"=>230, "\u030D"=>230, "\u030E"=>230, "\u030F"=>230,
"\u0310"=>230, "\u0311"=>230, "\u0312"=>230, "\u0313"=>230, "\u0314"=>230, "\u0315"=>232, "\u0316"=>220, "\u0317"=>220,
"\u0318"=>220, "\u0319"=>220, "\u031A"=>232, "\u031B"=>216, "\u031C"=>220, "\u031D"=>220, "\u031E"=>220, "\u031F"=>220,
"\u0320"=>220, "\u0321"=>202, "\u0322"=>202, "\u0323"=>220, "\u0324"=>220, "\u0325"=>220, "\u0326"=>220, "\u0327"=>202,
"\u0328"=>202, "\u0329"=>220, "\u032A"=>220, "\u032B"=>220, "\u032C"=>220, "\u032D"=>220, "\u032E"=>220, "\u032F"=>220,
"\u0330"=>220, "\u0331"=>220, "\u0332"=>220, "\u0333"=>220, "\u0334"=>1, "\u0335"=>1, "\u0336"=>1, "\u0337"=>1,
"\u0338"=>1, "\u0339"=>220, "\u033A"=>220, "\u033B"=>220, "\u033C"=>220, "\u033D"=>230, "\u033E"=>230, "\u033F"=>230,
"\u0340"=>230, "\u0341"=>230, "\u0342"=>230, "\u0343"=>230, "\u0344"=>230, "\u0345"=>240, "\u0346"=>230, "\u0347"=>220,
"\u0348"=>220, "\u0349"=>220, "\u034A"=>230, "\u034B"=>230, "\u034C"=>230, "\u034D"=>220, "\u034E"=>220, "\u0350"=>230,
"\u0351"=>230, "\u0352"=>230, "\u0353"=>220, "\u0354"=>220, "\u0355"=>220, "\u0356"=>220, "\u0357"=>230, "\u0358"=>232,
"\u0359"=>220, "\u035A"=>220, "\u035B"=>230, "\u035C"=>233, "\u035D"=>234, "\u035E"=>234, "\u035F"=>233, "\u0360"=>234,
"\u0361"=>234, "\u0362"=>233, "\u0363"=>230, "\u0364"=>230, "\u0365"=>230, "\u0366"=>230, "\u0367"=>230, "\u0368"=>230,
"\u0369"=>230, "\u036A"=>230, "\u036B"=>230, "\u036C"=>230, "\u036D"=>230, "\u036E"=>230, "\u036F"=>230, "\u0483"=>230,
"\u0484"=>230, "\u0485"=>230, "\u0486"=>230, "\u0487"=>230, "\u0591"=>220, "\u0592"=>230, "\u0593"=>230, "\u0594"=>230,
"\u0595"=>230, "\u0596"=>220, "\u0597"=>230, "\u0598"=>230, "\u0599"=>230, "\u059A"=>222, "\u059B"=>220, "\u059C"=>230,
"\u059D"=>230, "\u059E"=>230, "\u059F"=>230, "\u05A0"=>230, "\u05A1"=>230, "\u05A2"=>220, "\u05A3"=>220, "\u05A4"=>220,
"\u05A5"=>220, "\u05A6"=>220, "\u05A7"=>220, "\u05A8"=>230, "\u05A9"=>230, "\u05AA"=>220, "\u05AB"=>230, "\u05AC"=>230,
"\u05AD"=>222, "\u05AE"=>228, "\u05AF"=>230, "\u05B0"=>10, "\u05B1"=>11, "\u05B2"=>12, "\u05B3"=>13, "\u05B4"=>14,
"\u05B5"=>15, "\u05B6"=>16, "\u05B7"=>17, "\u05B8"=>18, "\u05B9"=>19, "\u05BA"=>19, "\u05BB"=>20, "\u05BC"=>21,
"\u05BD"=>22, "\u05BF"=>23, "\u05C1"=>24, "\u05C2"=>25, "\u05C4"=>230, "\u05C5"=>220, "\u05C7"=>18, "\u0610"=>230,
"\u0611"=>230, "\u0612"=>230, "\u0613"=>230, "\u0614"=>230, "\u0615"=>230, "\u0616"=>230, "\u0617"=>230, "\u0618"=>30,
"\u0619"=>31, "\u061A"=>32, "\u064B"=>27, "\u064C"=>28, "\u064D"=>29, "\u064E"=>30, "\u064F"=>31, "\u0650"=>32,
"\u0651"=>33, "\u0652"=>34, "\u0653"=>230, "\u0654"=>230, "\u0655"=>220, "\u0656"=>220, "\u0657"=>230, "\u0658"=>230,
"\u0659"=>230, "\u065A"=>230, "\u065B"=>230, "\u065C"=>220, "\u065D"=>230, "\u065E"=>230, "\u065F"=>220, "\u0670"=>35,
"\u06D6"=>230, "\u06D7"=>230, "\u06D8"=>230, "\u06D9"=>230, "\u06DA"=>230, "\u06DB"=>230, "\u06DC"=>230, "\u06DF"=>230,
"\u06E0"=>230, "\u06E1"=>230, "\u06E2"=>230, "\u06E3"=>220, "\u06E4"=>230, "\u06E7"=>230, "\u06E8"=>230, "\u06EA"=>220,
"\u06EB"=>230, "\u06EC"=>230, "\u06ED"=>220, "\u0711"=>36, "\u0730"=>230, "\u0731"=>220, "\u0732"=>230, "\u0733"=>230,
"\u0734"=>220, "\u0735"=>230, "\u0736"=>230, "\u0737"=>220, "\u0738"=>220, "\u0739"=>220, "\u073A"=>230, "\u073B"=>220,
"\u073C"=>220, "\u073D"=>230, "\u073E"=>220, "\u073F"=>230, "\u0740"=>230, "\u0741"=>230, "\u0742"=>220, "\u0743"=>230,
"\u0744"=>220, "\u0745"=>230, "\u0746"=>220, "\u0747"=>230, "\u0748"=>220, "\u0749"=>230, "\u074A"=>230, "\u07EB"=>230,
"\u07EC"=>230, "\u07ED"=>230, "\u07EE"=>230, "\u07EF"=>230, "\u07F0"=>230, "\u07F1"=>230, "\u07F2"=>220, "\u07F3"=>230,
"\u0816"=>230, "\u0817"=>230, "\u0818"=>230, "\u0819"=>230, "\u081B"=>230, "\u081C"=>230, "\u081D"=>230, "\u081E"=>230,
"\u081F"=>230, "\u0820"=>230, "\u0821"=>230, "\u0822"=>230, "\u0823"=>230, "\u0825"=>230, "\u0826"=>230, "\u0827"=>230,
"\u0829"=>230, "\u082A"=>230, "\u082B"=>230, "\u082C"=>230, "\u082D"=>230, "\u0859"=>220, "\u085A"=>220, "\u085B"=>220,
"\u08D4"=>230, "\u08D5"=>230, "\u08D6"=>230, "\u08D7"=>230, "\u08D8"=>230, "\u08D9"=>230, "\u08DA"=>230, "\u08DB"=>230,
"\u08DC"=>230, "\u08DD"=>230, "\u08DE"=>230, "\u08DF"=>230, "\u08E0"=>230, "\u08E1"=>230, "\u08E3"=>220, "\u08E4"=>230,
"\u08E5"=>230, "\u08E6"=>220, "\u08E7"=>230, "\u08E8"=>230, "\u08E9"=>220, "\u08EA"=>230, "\u08EB"=>230, "\u08EC"=>230,
"\u08ED"=>220, "\u08EE"=>220, "\u08EF"=>220, "\u08F0"=>27, "\u08F1"=>28, "\u08F2"=>29, "\u08F3"=>230, "\u08F4"=>230,
"\u08F5"=>230, "\u08F6"=>220, "\u08F7"=>230, "\u08F8"=>230, "\u08F9"=>220, "\u08FA"=>220, "\u08FB"=>230, "\u08FC"=>230,
"\u08FD"=>230, "\u08FE"=>230, "\u08FF"=>230, "\u093C"=>7, "\u094D"=>9, "\u0951"=>230, "\u0952"=>220, "\u0953"=>230,
"\u0954"=>230, "\u09BC"=>7, "\u09CD"=>9, "\u0A3C"=>7, "\u0A4D"=>9, "\u0ABC"=>7, "\u0ACD"=>9, "\u0B3C"=>7,
"\u0B4D"=>9, "\u0BCD"=>9, "\u0C4D"=>9, "\u0C55"=>84, "\u0C56"=>91, "\u0CBC"=>7, "\u0CCD"=>9, "\u0D4D"=>9,
"\u0DCA"=>9, "\u0E38"=>103, "\u0E39"=>103, "\u0E3A"=>9, "\u0E48"=>107, "\u0E49"=>107, "\u0E4A"=>107, "\u0E4B"=>107,
"\u0EB8"=>118, "\u0EB9"=>118, "\u0EC8"=>122, "\u0EC9"=>122, "\u0ECA"=>122, "\u0ECB"=>122, "\u0F18"=>220, "\u0F19"=>220,
"\u0F35"=>220, "\u0F37"=>220, "\u0F39"=>216, "\u0F71"=>129, "\u0F72"=>130, "\u0F74"=>132, "\u0F7A"=>130, "\u0F7B"=>130,
"\u0F7C"=>130, "\u0F7D"=>130, "\u0F80"=>130, "\u0F82"=>230, "\u0F83"=>230, "\u0F84"=>9, "\u0F86"=>230, "\u0F87"=>230,
"\u0FC6"=>220, "\u1037"=>7, "\u1039"=>9, "\u103A"=>9, "\u108D"=>220, "\u135D"=>230, "\u135E"=>230, "\u135F"=>230,
"\u1714"=>9, "\u1734"=>9, "\u17D2"=>9, "\u17DD"=>230, "\u18A9"=>228, "\u1939"=>222, "\u193A"=>230, "\u193B"=>220,
"\u1A17"=>230, "\u1A18"=>220, "\u1A60"=>9, "\u1A75"=>230, "\u1A76"=>230, "\u1A77"=>230, "\u1A78"=>230, "\u1A79"=>230,
"\u1A7A"=>230, "\u1A7B"=>230, "\u1A7C"=>230, "\u1A7F"=>220, "\u1AB0"=>230, "\u1AB1"=>230, "\u1AB2"=>230, "\u1AB3"=>230,
"\u1AB4"=>230, "\u1AB5"=>220, "\u1AB6"=>220, "\u1AB7"=>220, "\u1AB8"=>220, "\u1AB9"=>220, "\u1ABA"=>220, "\u1ABB"=>230,
"\u1ABC"=>230, "\u1ABD"=>220, "\u1B34"=>7, "\u1B44"=>9, "\u1B6B"=>230, "\u1B6C"=>220, "\u1B6D"=>230, "\u1B6E"=>230,
"\u1B6F"=>230, "\u1B70"=>230, "\u1B71"=>230, "\u1B72"=>230, "\u1B73"=>230, "\u1BAA"=>9, "\u1BAB"=>9, "\u1BE6"=>7,
"\u1BF2"=>9, "\u1BF3"=>9, "\u1C37"=>7, "\u1CD0"=>230, "\u1CD1"=>230, "\u1CD2"=>230, "\u1CD4"=>1, "\u1CD5"=>220,
"\u1CD6"=>220, "\u1CD7"=>220, "\u1CD8"=>220, "\u1CD9"=>220, "\u1CDA"=>230, "\u1CDB"=>230, "\u1CDC"=>220, "\u1CDD"=>220,
"\u1CDE"=>220, "\u1CDF"=>220, "\u1CE0"=>230, "\u1CE2"=>1, "\u1CE3"=>1, "\u1CE4"=>1, "\u1CE5"=>1, "\u1CE6"=>1,
"\u1CE7"=>1, "\u1CE8"=>1, "\u1CED"=>220, "\u1CF4"=>230, "\u1CF8"=>230, "\u1CF9"=>230, "\u1DC0"=>230, "\u1DC1"=>230,
"\u1DC2"=>220, "\u1DC3"=>230, "\u1DC4"=>230, "\u1DC5"=>230, "\u1DC6"=>230, "\u1DC7"=>230, "\u1DC8"=>230, "\u1DC9"=>230,
"\u1DCA"=>220, "\u1DCB"=>230, "\u1DCC"=>230, "\u1DCD"=>234, "\u1DCE"=>214, "\u1DCF"=>220, "\u1DD0"=>202, "\u1DD1"=>230,
"\u1DD2"=>230, "\u1DD3"=>230, "\u1DD4"=>230, "\u1DD5"=>230, "\u1DD6"=>230, "\u1DD7"=>230, "\u1DD8"=>230, "\u1DD9"=>230,
"\u1DDA"=>230, "\u1DDB"=>230, "\u1DDC"=>230, "\u1DDD"=>230, "\u1DDE"=>230, "\u1DDF"=>230, "\u1DE0"=>230, "\u1DE1"=>230,
"\u1DE2"=>230, "\u1DE3"=>230, "\u1DE4"=>230, "\u1DE5"=>230, "\u1DE6"=>230, "\u1DE7"=>230, "\u1DE8"=>230, "\u1DE9"=>230,
"\u1DEA"=>230, "\u1DEB"=>230, "\u1DEC"=>230, "\u1DED"=>230, "\u1DEE"=>230, "\u1DEF"=>230, "\u1DF0"=>230, "\u1DF1"=>230,
"\u1DF2"=>230, "\u1DF3"=>230, "\u1DF4"=>230, "\u1DF5"=>230, "\u1DFB"=>230, "\u1DFC"=>233, "\u1DFD"=>220, "\u1DFE"=>230,
"\u1DFF"=>220, "\u20D0"=>230, "\u20D1"=>230, "\u20D2"=>1, "\u20D3"=>1, "\u20D4"=>230, "\u20D5"=>230, "\u20D6"=>230,
"\u20D7"=>230, "\u20D8"=>1, "\u20D9"=>1, "\u20DA"=>1, "\u20DB"=>230, "\u20DC"=>230, "\u20E1"=>230, "\u20E5"=>1,
"\u20E6"=>1, "\u20E7"=>230, "\u20E8"=>220, "\u20E9"=>230, "\u20EA"=>1, "\u20EB"=>1, "\u20EC"=>220, "\u20ED"=>220,
"\u20EE"=>220, "\u20EF"=>220, "\u20F0"=>230, "\u2CEF"=>230, "\u2CF0"=>230, "\u2CF1"=>230, "\u2D7F"=>9, "\u2DE0"=>230,
"\u2DE1"=>230, "\u2DE2"=>230, "\u2DE3"=>230, "\u2DE4"=>230, "\u2DE5"=>230, "\u2DE6"=>230, "\u2DE7"=>230, "\u2DE8"=>230,
"\u2DE9"=>230, "\u2DEA"=>230, "\u2DEB"=>230, "\u2DEC"=>230, "\u2DED"=>230, "\u2DEE"=>230, "\u2DEF"=>230, "\u2DF0"=>230,
"\u2DF1"=>230, "\u2DF2"=>230, "\u2DF3"=>230, "\u2DF4"=>230, "\u2DF5"=>230, "\u2DF6"=>230, "\u2DF7"=>230, "\u2DF8"=>230,
"\u2DF9"=>230, "\u2DFA"=>230, "\u2DFB"=>230, "\u2DFC"=>230, "\u2DFD"=>230, "\u2DFE"=>230, "\u2DFF"=>230, "\u302A"=>218,
"\u302B"=>228, "\u302C"=>232, "\u302D"=>222, "\u302E"=>224, "\u302F"=>224, "\u3099"=>8, "\u309A"=>8, "\uA66F"=>230,
"\uA674"=>230, "\uA675"=>230, "\uA676"=>230, "\uA677"=>230, "\uA678"=>230, "\uA679"=>230, "\uA67A"=>230, "\uA67B"=>230,
"\uA67C"=>230, "\uA67D"=>230, "\uA69E"=>230, "\uA69F"=>230, "\uA6F0"=>230, "\uA6F1"=>230, "\uA806"=>9, "\uA8C4"=>9,
"\uA8E0"=>230, "\uA8E1"=>230, "\uA8E2"=>230, "\uA8E3"=>230, "\uA8E4"=>230, "\uA8E5"=>230, "\uA8E6"=>230, "\uA8E7"=>230,
"\uA8E8"=>230, "\uA8E9"=>230, "\uA8EA"=>230, "\uA8EB"=>230, "\uA8EC"=>230, "\uA8ED"=>230, "\uA8EE"=>230, "\uA8EF"=>230,
"\uA8F0"=>230, "\uA8F1"=>230, "\uA92B"=>220, "\uA92C"=>220, "\uA92D"=>220, "\uA953"=>9, "\uA9B3"=>7, "\uA9C0"=>9,
"\uAAB0"=>230, "\uAAB2"=>230, "\uAAB3"=>230, "\uAAB4"=>220, "\uAAB7"=>230, "\uAAB8"=>230, "\uAABE"=>230, "\uAABF"=>230,
"\uAAC1"=>230, "\uAAF6"=>9, "\uABED"=>9, "\uFB1E"=>26, "\uFE20"=>230, "\uFE21"=>230, "\uFE22"=>230, "\uFE23"=>230,
"\uFE24"=>230, "\uFE25"=>230, "\uFE26"=>230, "\uFE27"=>220, "\uFE28"=>220, "\uFE29"=>220, "\uFE2A"=>220, "\uFE2B"=>220,
"\uFE2C"=>220, "\uFE2D"=>220, "\uFE2E"=>230, "\uFE2F"=>230, "\u{101FD}"=>220, "\u{102E0}"=>220, "\u{10376}"=>230, "\u{10377}"=>230,
"\u{10378}"=>230, "\u{10379}"=>230, "\u{1037A}"=>230, "\u{10A0D}"=>220, "\u{10A0F}"=>230, "\u{10A38}"=>230, "\u{10A39}"=>1, "\u{10A3A}"=>220,
"\u{10A3F}"=>9, "\u{10AE5}"=>230, "\u{10AE6}"=>220, "\u{11046}"=>9, "\u{1107F}"=>9, "\u{110B9}"=>9, "\u{110BA}"=>7, "\u{11100}"=>230,
"\u{11101}"=>230, "\u{11102}"=>230, "\u{11133}"=>9, "\u{11134}"=>9, "\u{11173}"=>7, "\u{111C0}"=>9, "\u{111CA}"=>7, "\u{11235}"=>9,
"\u{11236}"=>7, "\u{112E9}"=>7, "\u{112EA}"=>9, "\u{1133C}"=>7, "\u{1134D}"=>9, "\u{11366}"=>230, "\u{11367}"=>230, "\u{11368}"=>230,
"\u{11369}"=>230, "\u{1136A}"=>230, "\u{1136B}"=>230, "\u{1136C}"=>230, "\u{11370}"=>230, "\u{11371}"=>230, "\u{11372}"=>230, "\u{11373}"=>230,
"\u{11374}"=>230, "\u{11442}"=>9, "\u{11446}"=>7, "\u{114C2}"=>9, "\u{114C3}"=>7, "\u{115BF}"=>9, "\u{115C0}"=>7, "\u{1163F}"=>9,
"\u{116B6}"=>9, "\u{116B7}"=>7, "\u{1172B}"=>9, "\u{11C3F}"=>9, "\u{16AF0}"=>1, "\u{16AF1}"=>1, "\u{16AF2}"=>1, "\u{16AF3}"=>1,
"\u{16AF4}"=>1, "\u{16B30}"=>230, "\u{16B31}"=>230, "\u{16B32}"=>230, "\u{16B33}"=>230, "\u{16B34}"=>230, "\u{16B35}"=>230, "\u{16B36}"=>230,
"\u{1BC9E}"=>1, "\u{1D165}"=>216, "\u{1D166}"=>216, "\u{1D167}"=>1, "\u{1D168}"=>1, "\u{1D169}"=>1, "\u{1D16D}"=>226, "\u{1D16E}"=>216,
"\u{1D16F}"=>216, "\u{1D170}"=>216, "\u{1D171}"=>216, "\u{1D172}"=>216, "\u{1D17B}"=>220, "\u{1D17C}"=>220, "\u{1D17D}"=>220, "\u{1D17E}"=>220,
"\u{1D17F}"=>220, "\u{1D180}"=>220, "\u{1D181}"=>220, "\u{1D182}"=>220, "\u{1D185}"=>230, "\u{1D186}"=>230, "\u{1D187}"=>230, "\u{1D188}"=>230,
"\u{1D189}"=>230, "\u{1D18A}"=>220, "\u{1D18B}"=>220, "\u{1D1AA}"=>230, "\u{1D1AB}"=>230, "\u{1D1AC}"=>230, "\u{1D1AD}"=>230, "\u{1D242}"=>230,
"\u{1D243}"=>230, "\u{1D244}"=>230, "\u{1E000}"=>230, "\u{1E001}"=>230, "\u{1E002}"=>230, "\u{1E003}"=>230, "\u{1E004}"=>230, "\u{1E005}"=>230,
"\u{1E006}"=>230, "\u{1E008}"=>230, "\u{1E009}"=>230, "\u{1E00A}"=>230, "\u{1E00B}"=>230, "\u{1E00C}"=>230, "\u{1E00D}"=>230, "\u{1E00E}"=>230,
"\u{1E00F}"=>230, "\u{1E010}"=>230, "\u{1E011}"=>230, "\u{1E012}"=>230, "\u{1E013}"=>230, "\u{1E014}"=>230, "\u{1E015}"=>230, "\u{1E016}"=>230,
"\u{1E017}"=>230, "\u{1E018}"=>230, "\u{1E01B}"=>230, "\u{1E01C}"=>230, "\u{1E01D}"=>230, "\u{1E01E}"=>230, "\u{1E01F}"=>230, "\u{1E020}"=>230,
"\u{1E021}"=>230, "\u{1E023}"=>230, "\u{1E024}"=>230, "\u{1E026}"=>230, "\u{1E027}"=>230, "\u{1E028}"=>230, "\u{1E029}"=>230, "\u{1E02A}"=>230,
"\u{1E8D0}"=>220, "\u{1E8D1}"=>220, "\u{1E8D2}"=>220, "\u{1E8D3}"=>220, "\u{1E8D4}"=>220, "\u{1E8D5}"=>220, "\u{1E8D6}"=>220, "\u{1E944}"=>230,
"\u{1E945}"=>230, "\u{1E946}"=>230, "\u{1E947}"=>230, "\u{1E948}"=>230, "\u{1E949}"=>230, "\u{1E94A}"=>7,
}
class_table.default = 0
CLASS_TABLE = class_table.freeze
DECOMPOSITION_TABLE = {
"\u00C0"=>"A\u0300", "\u00C1"=>"A\u0301", "\u00C2"=>"A\u0302", "\u00C3"=>"A\u0303", "\u00C4"=>"A\u0308", "\u00C5"=>"A\u030A", "\u00C7"=>"C\u0327", "\u00C8"=>"E\u0300",
"\u00C9"=>"E\u0301", "\u00CA"=>"E\u0302", "\u00CB"=>"E\u0308", "\u00CC"=>"I\u0300", "\u00CD"=>"I\u0301", "\u00CE"=>"I\u0302", "\u00CF"=>"I\u0308", "\u00D1"=>"N\u0303",
"\u00D2"=>"O\u0300", "\u00D3"=>"O\u0301", "\u00D4"=>"O\u0302", "\u00D5"=>"O\u0303", "\u00D6"=>"O\u0308", "\u00D9"=>"U\u0300", "\u00DA"=>"U\u0301", "\u00DB"=>"U\u0302",
"\u00DC"=>"U\u0308", "\u00DD"=>"Y\u0301", "\u00E0"=>"a\u0300", "\u00E1"=>"a\u0301", "\u00E2"=>"a\u0302", "\u00E3"=>"a\u0303", "\u00E4"=>"a\u0308", "\u00E5"=>"a\u030A",
"\u00E7"=>"c\u0327", "\u00E8"=>"e\u0300", "\u00E9"=>"e\u0301", "\u00EA"=>"e\u0302", "\u00EB"=>"e\u0308", "\u00EC"=>"i\u0300", "\u00ED"=>"i\u0301", "\u00EE"=>"i\u0302",
"\u00EF"=>"i\u0308", "\u00F1"=>"n\u0303", "\u00F2"=>"o\u0300", "\u00F3"=>"o\u0301", "\u00F4"=>"o\u0302", "\u00F5"=>"o\u0303", "\u00F6"=>"o\u0308", "\u00F9"=>"u\u0300",
"\u00FA"=>"u\u0301", "\u00FB"=>"u\u0302", "\u00FC"=>"u\u0308", "\u00FD"=>"y\u0301", "\u00FF"=>"y\u0308", "\u0100"=>"A\u0304", "\u0101"=>"a\u0304", "\u0102"=>"A\u0306",
"\u0103"=>"a\u0306", "\u0104"=>"A\u0328", "\u0105"=>"a\u0328", "\u0106"=>"C\u0301", "\u0107"=>"c\u0301", "\u0108"=>"C\u0302", "\u0109"=>"c\u0302", "\u010A"=>"C\u0307",
"\u010B"=>"c\u0307", "\u010C"=>"C\u030C", "\u010D"=>"c\u030C", "\u010E"=>"D\u030C", "\u010F"=>"d\u030C", "\u0112"=>"E\u0304", "\u0113"=>"e\u0304", "\u0114"=>"E\u0306",
"\u0115"=>"e\u0306", "\u0116"=>"E\u0307", "\u0117"=>"e\u0307", "\u0118"=>"E\u0328", "\u0119"=>"e\u0328", "\u011A"=>"E\u030C", "\u011B"=>"e\u030C", "\u011C"=>"G\u0302",
"\u011D"=>"g\u0302", "\u011E"=>"G\u0306", "\u011F"=>"g\u0306", "\u0120"=>"G\u0307", "\u0121"=>"g\u0307", "\u0122"=>"G\u0327", "\u0123"=>"g\u0327", "\u0124"=>"H\u0302",
"\u0125"=>"h\u0302", "\u0128"=>"I\u0303", "\u0129"=>"i\u0303", "\u012A"=>"I\u0304", "\u012B"=>"i\u0304", "\u012C"=>"I\u0306", "\u012D"=>"i\u0306", "\u012E"=>"I\u0328",
"\u012F"=>"i\u0328", "\u0130"=>"I\u0307", "\u0134"=>"J\u0302", "\u0135"=>"j\u0302", "\u0136"=>"K\u0327", "\u0137"=>"k\u0327", "\u0139"=>"L\u0301", "\u013A"=>"l\u0301",
"\u013B"=>"L\u0327", "\u013C"=>"l\u0327", "\u013D"=>"L\u030C", "\u013E"=>"l\u030C", "\u0143"=>"N\u0301", "\u0144"=>"n\u0301", "\u0145"=>"N\u0327", "\u0146"=>"n\u0327",
"\u0147"=>"N\u030C", "\u0148"=>"n\u030C", "\u014C"=>"O\u0304", "\u014D"=>"o\u0304", "\u014E"=>"O\u0306", "\u014F"=>"o\u0306", "\u0150"=>"O\u030B", "\u0151"=>"o\u030B",
"\u0154"=>"R\u0301", "\u0155"=>"r\u0301", "\u0156"=>"R\u0327", "\u0157"=>"r\u0327", "\u0158"=>"R\u030C", "\u0159"=>"r\u030C", "\u015A"=>"S\u0301", "\u015B"=>"s\u0301",
"\u015C"=>"S\u0302", "\u015D"=>"s\u0302", "\u015E"=>"S\u0327", "\u015F"=>"s\u0327", "\u0160"=>"S\u030C", "\u0161"=>"s\u030C", "\u0162"=>"T\u0327", "\u0163"=>"t\u0327",
"\u0164"=>"T\u030C", "\u0165"=>"t\u030C", "\u0168"=>"U\u0303", "\u0169"=>"u\u0303", "\u016A"=>"U\u0304", "\u016B"=>"u\u0304", "\u016C"=>"U\u0306", "\u016D"=>"u\u0306",
"\u016E"=>"U\u030A", "\u016F"=>"u\u030A", "\u0170"=>"U\u030B", "\u0171"=>"u\u030B", "\u0172"=>"U\u0328", "\u0173"=>"u\u0328", "\u0174"=>"W\u0302", "\u0175"=>"w\u0302",
"\u0176"=>"Y\u0302", "\u0177"=>"y\u0302", "\u0178"=>"Y\u0308", "\u0179"=>"Z\u0301", "\u017A"=>"z\u0301", "\u017B"=>"Z\u0307", "\u017C"=>"z\u0307", "\u017D"=>"Z\u030C",
"\u017E"=>"z\u030C", "\u01A0"=>"O\u031B", "\u01A1"=>"o\u031B", "\u01AF"=>"U\u031B", "\u01B0"=>"u\u031B", "\u01CD"=>"A\u030C", "\u01CE"=>"a\u030C", "\u01CF"=>"I\u030C",
"\u01D0"=>"i\u030C", "\u01D1"=>"O\u030C", "\u01D2"=>"o\u030C", "\u01D3"=>"U\u030C", "\u01D4"=>"u\u030C", "\u01D5"=>"U\u0308\u0304", "\u01D6"=>"u\u0308\u0304", "\u01D7"=>"U\u0308\u0301",
"\u01D8"=>"u\u0308\u0301", "\u01D9"=>"U\u0308\u030C", "\u01DA"=>"u\u0308\u030C", "\u01DB"=>"U\u0308\u0300", "\u01DC"=>"u\u0308\u0300", "\u01DE"=>"A\u0308\u0304", "\u01DF"=>"a\u0308\u0304", "\u01E0"=>"A\u0307\u0304",
"\u01E1"=>"a\u0307\u0304", "\u01E2"=>"\u00C6\u0304", "\u01E3"=>"\u00E6\u0304", "\u01E6"=>"G\u030C", "\u01E7"=>"g\u030C", "\u01E8"=>"K\u030C", "\u01E9"=>"k\u030C", "\u01EA"=>"O\u0328",
"\u01EB"=>"o\u0328", "\u01EC"=>"O\u0328\u0304", "\u01ED"=>"o\u0328\u0304", "\u01EE"=>"\u01B7\u030C", "\u01EF"=>"\u0292\u030C", "\u01F0"=>"j\u030C", "\u01F4"=>"G\u0301", "\u01F5"=>"g\u0301",
"\u01F8"=>"N\u0300", "\u01F9"=>"n\u0300", "\u01FA"=>"A\u030A\u0301", "\u01FB"=>"a\u030A\u0301", "\u01FC"=>"\u00C6\u0301", "\u01FD"=>"\u00E6\u0301", "\u01FE"=>"\u00D8\u0301", "\u01FF"=>"\u00F8\u0301",
"\u0200"=>"A\u030F", "\u0201"=>"a\u030F", "\u0202"=>"A\u0311", "\u0203"=>"a\u0311", "\u0204"=>"E\u030F", "\u0205"=>"e\u030F", "\u0206"=>"E\u0311", "\u0207"=>"e\u0311",
"\u0208"=>"I\u030F", "\u0209"=>"i\u030F", "\u020A"=>"I\u0311", "\u020B"=>"i\u0311", "\u020C"=>"O\u030F", "\u020D"=>"o\u030F", "\u020E"=>"O\u0311", "\u020F"=>"o\u0311",
"\u0210"=>"R\u030F", "\u0211"=>"r\u030F", "\u0212"=>"R\u0311", "\u0213"=>"r\u0311", "\u0214"=>"U\u030F", "\u0215"=>"u\u030F", "\u0216"=>"U\u0311", "\u0217"=>"u\u0311",
"\u0218"=>"S\u0326", "\u0219"=>"s\u0326", "\u021A"=>"T\u0326", "\u021B"=>"t\u0326", "\u021E"=>"H\u030C", "\u021F"=>"h\u030C", "\u0226"=>"A\u0307", "\u0227"=>"a\u0307",
"\u0228"=>"E\u0327", "\u0229"=>"e\u0327", "\u022A"=>"O\u0308\u0304", "\u022B"=>"o\u0308\u0304", "\u022C"=>"O\u0303\u0304", "\u022D"=>"o\u0303\u0304", "\u022E"=>"O\u0307", "\u022F"=>"o\u0307",
"\u0230"=>"O\u0307\u0304", "\u0231"=>"o\u0307\u0304", "\u0232"=>"Y\u0304", "\u0233"=>"y\u0304", "\u0340"=>"\u0300", "\u0341"=>"\u0301", "\u0343"=>"\u0313", "\u0344"=>"\u0308\u0301",
"\u0374"=>"\u02B9", "\u037E"=>";", "\u0385"=>"\u00A8\u0301", "\u0386"=>"\u0391\u0301", "\u0387"=>"\u00B7", "\u0388"=>"\u0395\u0301", "\u0389"=>"\u0397\u0301", "\u038A"=>"\u0399\u0301",
"\u038C"=>"\u039F\u0301", "\u038E"=>"\u03A5\u0301", "\u038F"=>"\u03A9\u0301", "\u0390"=>"\u03B9\u0308\u0301", "\u03AA"=>"\u0399\u0308", "\u03AB"=>"\u03A5\u0308", "\u03AC"=>"\u03B1\u0301", "\u03AD"=>"\u03B5\u0301",
"\u03AE"=>"\u03B7\u0301", "\u03AF"=>"\u03B9\u0301", "\u03B0"=>"\u03C5\u0308\u0301", "\u03CA"=>"\u03B9\u0308", "\u03CB"=>"\u03C5\u0308", "\u03CC"=>"\u03BF\u0301", "\u03CD"=>"\u03C5\u0301", "\u03CE"=>"\u03C9\u0301",
"\u03D3"=>"\u03D2\u0301", "\u03D4"=>"\u03D2\u0308", "\u0400"=>"\u0415\u0300", "\u0401"=>"\u0415\u0308", "\u0403"=>"\u0413\u0301", "\u0407"=>"\u0406\u0308", "\u040C"=>"\u041A\u0301", "\u040D"=>"\u0418\u0300",
"\u040E"=>"\u0423\u0306", "\u0419"=>"\u0418\u0306", "\u0439"=>"\u0438\u0306", "\u0450"=>"\u0435\u0300", "\u0451"=>"\u0435\u0308", "\u0453"=>"\u0433\u0301", "\u0457"=>"\u0456\u0308", "\u045C"=>"\u043A\u0301",
"\u045D"=>"\u0438\u0300", "\u045E"=>"\u0443\u0306", "\u0476"=>"\u0474\u030F", "\u0477"=>"\u0475\u030F", "\u04C1"=>"\u0416\u0306", "\u04C2"=>"\u0436\u0306", "\u04D0"=>"\u0410\u0306", "\u04D1"=>"\u0430\u0306",
"\u04D2"=>"\u0410\u0308", "\u04D3"=>"\u0430\u0308", "\u04D6"=>"\u0415\u0306", "\u04D7"=>"\u0435\u0306", "\u04DA"=>"\u04D8\u0308", "\u04DB"=>"\u04D9\u0308", "\u04DC"=>"\u0416\u0308", "\u04DD"=>"\u0436\u0308",
"\u04DE"=>"\u0417\u0308", "\u04DF"=>"\u0437\u0308", "\u04E2"=>"\u0418\u0304", "\u04E3"=>"\u0438\u0304", "\u04E4"=>"\u0418\u0308", "\u04E5"=>"\u0438\u0308", "\u04E6"=>"\u041E\u0308", "\u04E7"=>"\u043E\u0308",
"\u04EA"=>"\u04E8\u0308", "\u04EB"=>"\u04E9\u0308", "\u04EC"=>"\u042D\u0308", "\u04ED"=>"\u044D\u0308", "\u04EE"=>"\u0423\u0304", "\u04EF"=>"\u0443\u0304", "\u04F0"=>"\u0423\u0308", "\u04F1"=>"\u0443\u0308",
"\u04F2"=>"\u0423\u030B", "\u04F3"=>"\u0443\u030B", "\u04F4"=>"\u0427\u0308", "\u04F5"=>"\u0447\u0308", "\u04F8"=>"\u042B\u0308", "\u04F9"=>"\u044B\u0308", "\u0622"=>"\u0627\u0653", "\u0623"=>"\u0627\u0654",
"\u0624"=>"\u0648\u0654", "\u0625"=>"\u0627\u0655", "\u0626"=>"\u064A\u0654", "\u06C0"=>"\u06D5\u0654", "\u06C2"=>"\u06C1\u0654", "\u06D3"=>"\u06D2\u0654", "\u0929"=>"\u0928\u093C", "\u0931"=>"\u0930\u093C",
"\u0934"=>"\u0933\u093C", "\u0958"=>"\u0915\u093C", "\u0959"=>"\u0916\u093C", "\u095A"=>"\u0917\u093C", "\u095B"=>"\u091C\u093C", "\u095C"=>"\u0921\u093C", "\u095D"=>"\u0922\u093C", "\u095E"=>"\u092B\u093C",
"\u095F"=>"\u092F\u093C", "\u09CB"=>"\u09C7\u09BE", "\u09CC"=>"\u09C7\u09D7", "\u09DC"=>"\u09A1\u09BC", "\u09DD"=>"\u09A2\u09BC", "\u09DF"=>"\u09AF\u09BC", "\u0A33"=>"\u0A32\u0A3C", "\u0A36"=>"\u0A38\u0A3C",
"\u0A59"=>"\u0A16\u0A3C", "\u0A5A"=>"\u0A17\u0A3C", "\u0A5B"=>"\u0A1C\u0A3C", "\u0A5E"=>"\u0A2B\u0A3C", "\u0B48"=>"\u0B47\u0B56", "\u0B4B"=>"\u0B47\u0B3E", "\u0B4C"=>"\u0B47\u0B57", "\u0B5C"=>"\u0B21\u0B3C",
"\u0B5D"=>"\u0B22\u0B3C", "\u0B94"=>"\u0B92\u0BD7", "\u0BCA"=>"\u0BC6\u0BBE", "\u0BCB"=>"\u0BC7\u0BBE", "\u0BCC"=>"\u0BC6\u0BD7", "\u0C48"=>"\u0C46\u0C56", "\u0CC0"=>"\u0CBF\u0CD5", "\u0CC7"=>"\u0CC6\u0CD5",
"\u0CC8"=>"\u0CC6\u0CD6", "\u0CCA"=>"\u0CC6\u0CC2", "\u0CCB"=>"\u0CC6\u0CC2\u0CD5", "\u0D4A"=>"\u0D46\u0D3E", "\u0D4B"=>"\u0D47\u0D3E", "\u0D4C"=>"\u0D46\u0D57", "\u0DDA"=>"\u0DD9\u0DCA", "\u0DDC"=>"\u0DD9\u0DCF",
"\u0DDD"=>"\u0DD9\u0DCF\u0DCA", "\u0DDE"=>"\u0DD9\u0DDF", "\u0F43"=>"\u0F42\u0FB7", "\u0F4D"=>"\u0F4C\u0FB7", "\u0F52"=>"\u0F51\u0FB7", "\u0F57"=>"\u0F56\u0FB7", "\u0F5C"=>"\u0F5B\u0FB7", "\u0F69"=>"\u0F40\u0FB5",
"\u0F73"=>"\u0F71\u0F72", "\u0F75"=>"\u0F71\u0F74", "\u0F76"=>"\u0FB2\u0F80", "\u0F78"=>"\u0FB3\u0F80", "\u0F81"=>"\u0F71\u0F80", "\u0F93"=>"\u0F92\u0FB7", "\u0F9D"=>"\u0F9C\u0FB7", "\u0FA2"=>"\u0FA1\u0FB7",
"\u0FA7"=>"\u0FA6\u0FB7", "\u0FAC"=>"\u0FAB\u0FB7", "\u0FB9"=>"\u0F90\u0FB5", "\u1026"=>"\u1025\u102E", "\u1B06"=>"\u1B05\u1B35", "\u1B08"=>"\u1B07\u1B35", "\u1B0A"=>"\u1B09\u1B35", "\u1B0C"=>"\u1B0B\u1B35",
"\u1B0E"=>"\u1B0D\u1B35", "\u1B12"=>"\u1B11\u1B35", "\u1B3B"=>"\u1B3A\u1B35", "\u1B3D"=>"\u1B3C\u1B35", "\u1B40"=>"\u1B3E\u1B35", "\u1B41"=>"\u1B3F\u1B35", "\u1B43"=>"\u1B42\u1B35", "\u1E00"=>"A\u0325",
"\u1E01"=>"a\u0325", "\u1E02"=>"B\u0307", "\u1E03"=>"b\u0307", "\u1E04"=>"B\u0323", "\u1E05"=>"b\u0323", "\u1E06"=>"B\u0331", "\u1E07"=>"b\u0331", "\u1E08"=>"C\u0327\u0301",
"\u1E09"=>"c\u0327\u0301", "\u1E0A"=>"D\u0307", "\u1E0B"=>"d\u0307", "\u1E0C"=>"D\u0323", "\u1E0D"=>"d\u0323", "\u1E0E"=>"D\u0331", "\u1E0F"=>"d\u0331", "\u1E10"=>"D\u0327",
"\u1E11"=>"d\u0327", "\u1E12"=>"D\u032D", "\u1E13"=>"d\u032D", "\u1E14"=>"E\u0304\u0300", "\u1E15"=>"e\u0304\u0300", "\u1E16"=>"E\u0304\u0301", "\u1E17"=>"e\u0304\u0301", "\u1E18"=>"E\u032D",
"\u1E19"=>"e\u032D", "\u1E1A"=>"E\u0330", "\u1E1B"=>"e\u0330", "\u1E1C"=>"E\u0327\u0306", "\u1E1D"=>"e\u0327\u0306", "\u1E1E"=>"F\u0307", "\u1E1F"=>"f\u0307", "\u1E20"=>"G\u0304",
"\u1E21"=>"g\u0304", "\u1E22"=>"H\u0307", "\u1E23"=>"h\u0307", "\u1E24"=>"H\u0323", "\u1E25"=>"h\u0323", "\u1E26"=>"H\u0308", "\u1E27"=>"h\u0308", "\u1E28"=>"H\u0327",
"\u1E29"=>"h\u0327", "\u1E2A"=>"H\u032E", "\u1E2B"=>"h\u032E", "\u1E2C"=>"I\u0330", "\u1E2D"=>"i\u0330", "\u1E2E"=>"I\u0308\u0301", "\u1E2F"=>"i\u0308\u0301", "\u1E30"=>"K\u0301",
"\u1E31"=>"k\u0301", "\u1E32"=>"K\u0323", "\u1E33"=>"k\u0323", "\u1E34"=>"K\u0331", "\u1E35"=>"k\u0331", "\u1E36"=>"L\u0323", "\u1E37"=>"l\u0323", "\u1E38"=>"L\u0323\u0304",
"\u1E39"=>"l\u0323\u0304", "\u1E3A"=>"L\u0331", "\u1E3B"=>"l\u0331", "\u1E3C"=>"L\u032D", "\u1E3D"=>"l\u032D", "\u1E3E"=>"M\u0301", "\u1E3F"=>"m\u0301", "\u1E40"=>"M\u0307",
"\u1E41"=>"m\u0307", "\u1E42"=>"M\u0323", "\u1E43"=>"m\u0323", "\u1E44"=>"N\u0307", "\u1E45"=>"n\u0307", "\u1E46"=>"N\u0323", "\u1E47"=>"n\u0323", "\u1E48"=>"N\u0331",
"\u1E49"=>"n\u0331", "\u1E4A"=>"N\u032D", "\u1E4B"=>"n\u032D", "\u1E4C"=>"O\u0303\u0301", "\u1E4D"=>"o\u0303\u0301", "\u1E4E"=>"O\u0303\u0308", "\u1E4F"=>"o\u0303\u0308", "\u1E50"=>"O\u0304\u0300",
"\u1E51"=>"o\u0304\u0300", "\u1E52"=>"O\u0304\u0301", "\u1E53"=>"o\u0304\u0301", "\u1E54"=>"P\u0301", "\u1E55"=>"p\u0301", "\u1E56"=>"P\u0307", "\u1E57"=>"p\u0307", "\u1E58"=>"R\u0307",
"\u1E59"=>"r\u0307", "\u1E5A"=>"R\u0323", "\u1E5B"=>"r\u0323", "\u1E5C"=>"R\u0323\u0304", "\u1E5D"=>"r\u0323\u0304", "\u1E5E"=>"R\u0331", "\u1E5F"=>"r\u0331", "\u1E60"=>"S\u0307",
"\u1E61"=>"s\u0307", "\u1E62"=>"S\u0323", "\u1E63"=>"s\u0323", "\u1E64"=>"S\u0301\u0307", "\u1E65"=>"s\u0301\u0307", "\u1E66"=>"S\u030C\u0307", "\u1E67"=>"s\u030C\u0307", "\u1E68"=>"S\u0323\u0307",
"\u1E69"=>"s\u0323\u0307", "\u1E6A"=>"T\u0307", "\u1E6B"=>"t\u0307", "\u1E6C"=>"T\u0323", "\u1E6D"=>"t\u0323", "\u1E6E"=>"T\u0331", "\u1E6F"=>"t\u0331", "\u1E70"=>"T\u032D",
"\u1E71"=>"t\u032D", "\u1E72"=>"U\u0324", "\u1E73"=>"u\u0324", "\u1E74"=>"U\u0330", "\u1E75"=>"u\u0330", "\u1E76"=>"U\u032D", "\u1E77"=>"u\u032D", "\u1E78"=>"U\u0303\u0301",
"\u1E79"=>"u\u0303\u0301", "\u1E7A"=>"U\u0304\u0308", "\u1E7B"=>"u\u0304\u0308", "\u1E7C"=>"V\u0303", "\u1E7D"=>"v\u0303", "\u1E7E"=>"V\u0323", "\u1E7F"=>"v\u0323", "\u1E80"=>"W\u0300",
"\u1E81"=>"w\u0300", "\u1E82"=>"W\u0301", "\u1E83"=>"w\u0301", "\u1E84"=>"W\u0308", "\u1E85"=>"w\u0308", "\u1E86"=>"W\u0307", "\u1E87"=>"w\u0307", "\u1E88"=>"W\u0323",
"\u1E89"=>"w\u0323", "\u1E8A"=>"X\u0307", "\u1E8B"=>"x\u0307", "\u1E8C"=>"X\u0308", "\u1E8D"=>"x\u0308", "\u1E8E"=>"Y\u0307", "\u1E8F"=>"y\u0307", "\u1E90"=>"Z\u0302",
"\u1E91"=>"z\u0302", "\u1E92"=>"Z\u0323", "\u1E93"=>"z\u0323", "\u1E94"=>"Z\u0331", "\u1E95"=>"z\u0331", "\u1E96"=>"h\u0331", "\u1E97"=>"t\u0308", "\u1E98"=>"w\u030A",
"\u1E99"=>"y\u030A", "\u1E9B"=>"\u017F\u0307", "\u1EA0"=>"A\u0323", "\u1EA1"=>"a\u0323", "\u1EA2"=>"A\u0309", "\u1EA3"=>"a\u0309", "\u1EA4"=>"A\u0302\u0301", "\u1EA5"=>"a\u0302\u0301",
"\u1EA6"=>"A\u0302\u0300", "\u1EA7"=>"a\u0302\u0300", "\u1EA8"=>"A\u0302\u0309", "\u1EA9"=>"a\u0302\u0309", "\u1EAA"=>"A\u0302\u0303", "\u1EAB"=>"a\u0302\u0303", "\u1EAC"=>"A\u0323\u0302", "\u1EAD"=>"a\u0323\u0302",
"\u1EAE"=>"A\u0306\u0301", "\u1EAF"=>"a\u0306\u0301", "\u1EB0"=>"A\u0306\u0300", "\u1EB1"=>"a\u0306\u0300", "\u1EB2"=>"A\u0306\u0309", "\u1EB3"=>"a\u0306\u0309", "\u1EB4"=>"A\u0306\u0303", "\u1EB5"=>"a\u0306\u0303",
"\u1EB6"=>"A\u0323\u0306", "\u1EB7"=>"a\u0323\u0306", "\u1EB8"=>"E\u0323", "\u1EB9"=>"e\u0323", "\u1EBA"=>"E\u0309", "\u1EBB"=>"e\u0309", "\u1EBC"=>"E\u0303", "\u1EBD"=>"e\u0303",
"\u1EBE"=>"E\u0302\u0301", "\u1EBF"=>"e\u0302\u0301", "\u1EC0"=>"E\u0302\u0300", "\u1EC1"=>"e\u0302\u0300", "\u1EC2"=>"E\u0302\u0309", "\u1EC3"=>"e\u0302\u0309", "\u1EC4"=>"E\u0302\u0303", "\u1EC5"=>"e\u0302\u0303",
"\u1EC6"=>"E\u0323\u0302", "\u1EC7"=>"e\u0323\u0302", "\u1EC8"=>"I\u0309", "\u1EC9"=>"i\u0309", "\u1ECA"=>"I\u0323", "\u1ECB"=>"i\u0323", "\u1ECC"=>"O\u0323", "\u1ECD"=>"o\u0323",
"\u1ECE"=>"O\u0309", "\u1ECF"=>"o\u0309", "\u1ED0"=>"O\u0302\u0301", "\u1ED1"=>"o\u0302\u0301", "\u1ED2"=>"O\u0302\u0300", "\u1ED3"=>"o\u0302\u0300", "\u1ED4"=>"O\u0302\u0309", "\u1ED5"=>"o\u0302\u0309",
"\u1ED6"=>"O\u0302\u0303", "\u1ED7"=>"o\u0302\u0303", "\u1ED8"=>"O\u0323\u0302", "\u1ED9"=>"o\u0323\u0302", "\u1EDA"=>"O\u031B\u0301", "\u1EDB"=>"o\u031B\u0301", "\u1EDC"=>"O\u031B\u0300", "\u1EDD"=>"o\u031B\u0300",
"\u1EDE"=>"O\u031B\u0309", "\u1EDF"=>"o\u031B\u0309", "\u1EE0"=>"O\u031B\u0303", "\u1EE1"=>"o\u031B\u0303", "\u1EE2"=>"O\u031B\u0323", "\u1EE3"=>"o\u031B\u0323", "\u1EE4"=>"U\u0323", "\u1EE5"=>"u\u0323",
"\u1EE6"=>"U\u0309", "\u1EE7"=>"u\u0309", "\u1EE8"=>"U\u031B\u0301", "\u1EE9"=>"u\u031B\u0301", "\u1EEA"=>"U\u031B\u0300", "\u1EEB"=>"u\u031B\u0300", "\u1EEC"=>"U\u031B\u0309", "\u1EED"=>"u\u031B\u0309",
"\u1EEE"=>"U\u031B\u0303", "\u1EEF"=>"u\u031B\u0303", "\u1EF0"=>"U\u031B\u0323", "\u1EF1"=>"u\u031B\u0323", "\u1EF2"=>"Y\u0300", "\u1EF3"=>"y\u0300", "\u1EF4"=>"Y\u0323", "\u1EF5"=>"y\u0323",
"\u1EF6"=>"Y\u0309", "\u1EF7"=>"y\u0309", "\u1EF8"=>"Y\u0303", "\u1EF9"=>"y\u0303", "\u1F00"=>"\u03B1\u0313", "\u1F01"=>"\u03B1\u0314", "\u1F02"=>"\u03B1\u0313\u0300", "\u1F03"=>"\u03B1\u0314\u0300",
"\u1F04"=>"\u03B1\u0313\u0301", "\u1F05"=>"\u03B1\u0314\u0301", "\u1F06"=>"\u03B1\u0313\u0342", "\u1F07"=>"\u03B1\u0314\u0342", "\u1F08"=>"\u0391\u0313", "\u1F09"=>"\u0391\u0314", "\u1F0A"=>"\u0391\u0313\u0300", "\u1F0B"=>"\u0391\u0314\u0300",
"\u1F0C"=>"\u0391\u0313\u0301", "\u1F0D"=>"\u0391\u0314\u0301", "\u1F0E"=>"\u0391\u0313\u0342", "\u1F0F"=>"\u0391\u0314\u0342", "\u1F10"=>"\u03B5\u0313", "\u1F11"=>"\u03B5\u0314", "\u1F12"=>"\u03B5\u0313\u0300", "\u1F13"=>"\u03B5\u0314\u0300",
"\u1F14"=>"\u03B5\u0313\u0301", "\u1F15"=>"\u03B5\u0314\u0301", "\u1F18"=>"\u0395\u0313", "\u1F19"=>"\u0395\u0314", "\u1F1A"=>"\u0395\u0313\u0300", "\u1F1B"=>"\u0395\u0314\u0300", "\u1F1C"=>"\u0395\u0313\u0301", "\u1F1D"=>"\u0395\u0314\u0301",
"\u1F20"=>"\u03B7\u0313", "\u1F21"=>"\u03B7\u0314", "\u1F22"=>"\u03B7\u0313\u0300", "\u1F23"=>"\u03B7\u0314\u0300", "\u1F24"=>"\u03B7\u0313\u0301", "\u1F25"=>"\u03B7\u0314\u0301", "\u1F26"=>"\u03B7\u0313\u0342", "\u1F27"=>"\u03B7\u0314\u0342",
"\u1F28"=>"\u0397\u0313", "\u1F29"=>"\u0397\u0314", "\u1F2A"=>"\u0397\u0313\u0300", "\u1F2B"=>"\u0397\u0314\u0300", "\u1F2C"=>"\u0397\u0313\u0301", "\u1F2D"=>"\u0397\u0314\u0301", "\u1F2E"=>"\u0397\u0313\u0342", "\u1F2F"=>"\u0397\u0314\u0342",
"\u1F30"=>"\u03B9\u0313", "\u1F31"=>"\u03B9\u0314", "\u1F32"=>"\u03B9\u0313\u0300", "\u1F33"=>"\u03B9\u0314\u0300", "\u1F34"=>"\u03B9\u0313\u0301", "\u1F35"=>"\u03B9\u0314\u0301", "\u1F36"=>"\u03B9\u0313\u0342", "\u1F37"=>"\u03B9\u0314\u0342",
"\u1F38"=>"\u0399\u0313", "\u1F39"=>"\u0399\u0314", "\u1F3A"=>"\u0399\u0313\u0300", "\u1F3B"=>"\u0399\u0314\u0300", "\u1F3C"=>"\u0399\u0313\u0301", "\u1F3D"=>"\u0399\u0314\u0301", "\u1F3E"=>"\u0399\u0313\u0342", "\u1F3F"=>"\u0399\u0314\u0342",
"\u1F40"=>"\u03BF\u0313", "\u1F41"=>"\u03BF\u0314", "\u1F42"=>"\u03BF\u0313\u0300", "\u1F43"=>"\u03BF\u0314\u0300", "\u1F44"=>"\u03BF\u0313\u0301", "\u1F45"=>"\u03BF\u0314\u0301", "\u1F48"=>"\u039F\u0313", "\u1F49"=>"\u039F\u0314",
"\u1F4A"=>"\u039F\u0313\u0300", "\u1F4B"=>"\u039F\u0314\u0300", "\u1F4C"=>"\u039F\u0313\u0301", "\u1F4D"=>"\u039F\u0314\u0301", "\u1F50"=>"\u03C5\u0313", "\u1F51"=>"\u03C5\u0314", "\u1F52"=>"\u03C5\u0313\u0300", "\u1F53"=>"\u03C5\u0314\u0300",
"\u1F54"=>"\u03C5\u0313\u0301", "\u1F55"=>"\u03C5\u0314\u0301", "\u1F56"=>"\u03C5\u0313\u0342", "\u1F57"=>"\u03C5\u0314\u0342", "\u1F59"=>"\u03A5\u0314", "\u1F5B"=>"\u03A5\u0314\u0300", "\u1F5D"=>"\u03A5\u0314\u0301", "\u1F5F"=>"\u03A5\u0314\u0342",
"\u1F60"=>"\u03C9\u0313", "\u1F61"=>"\u03C9\u0314", "\u1F62"=>"\u03C9\u0313\u0300", "\u1F63"=>"\u03C9\u0314\u0300", "\u1F64"=>"\u03C9\u0313\u0301", "\u1F65"=>"\u03C9\u0314\u0301", "\u1F66"=>"\u03C9\u0313\u0342", "\u1F67"=>"\u03C9\u0314\u0342",
"\u1F68"=>"\u03A9\u0313", "\u1F69"=>"\u03A9\u0314", "\u1F6A"=>"\u03A9\u0313\u0300", "\u1F6B"=>"\u03A9\u0314\u0300", "\u1F6C"=>"\u03A9\u0313\u0301", "\u1F6D"=>"\u03A9\u0314\u0301", "\u1F6E"=>"\u03A9\u0313\u0342", "\u1F6F"=>"\u03A9\u0314\u0342",
"\u1F70"=>"\u03B1\u0300", "\u1F71"=>"\u03B1\u0301", "\u1F72"=>"\u03B5\u0300", "\u1F73"=>"\u03B5\u0301", "\u1F74"=>"\u03B7\u0300", "\u1F75"=>"\u03B7\u0301", "\u1F76"=>"\u03B9\u0300", "\u1F77"=>"\u03B9\u0301",
"\u1F78"=>"\u03BF\u0300", "\u1F79"=>"\u03BF\u0301", "\u1F7A"=>"\u03C5\u0300", "\u1F7B"=>"\u03C5\u0301", "\u1F7C"=>"\u03C9\u0300", "\u1F7D"=>"\u03C9\u0301", "\u1F80"=>"\u03B1\u0313\u0345", "\u1F81"=>"\u03B1\u0314\u0345",
"\u1F82"=>"\u03B1\u0313\u0300\u0345", "\u1F83"=>"\u03B1\u0314\u0300\u0345", "\u1F84"=>"\u03B1\u0313\u0301\u0345", "\u1F85"=>"\u03B1\u0314\u0301\u0345", "\u1F86"=>"\u03B1\u0313\u0342\u0345", "\u1F87"=>"\u03B1\u0314\u0342\u0345", "\u1F88"=>"\u0391\u0313\u0345", "\u1F89"=>"\u0391\u0314\u0345",
"\u1F8A"=>"\u0391\u0313\u0300\u0345", "\u1F8B"=>"\u0391\u0314\u0300\u0345", "\u1F8C"=>"\u0391\u0313\u0301\u0345", "\u1F8D"=>"\u0391\u0314\u0301\u0345", "\u1F8E"=>"\u0391\u0313\u0342\u0345", "\u1F8F"=>"\u0391\u0314\u0342\u0345", "\u1F90"=>"\u03B7\u0313\u0345", "\u1F91"=>"\u03B7\u0314\u0345",
"\u1F92"=>"\u03B7\u0313\u0300\u0345", "\u1F93"=>"\u03B7\u0314\u0300\u0345", "\u1F94"=>"\u03B7\u0313\u0301\u0345", "\u1F95"=>"\u03B7\u0314\u0301\u0345", "\u1F96"=>"\u03B7\u0313\u0342\u0345", "\u1F97"=>"\u03B7\u0314\u0342\u0345", "\u1F98"=>"\u0397\u0313\u0345", "\u1F99"=>"\u0397\u0314\u0345",
"\u1F9A"=>"\u0397\u0313\u0300\u0345", "\u1F9B"=>"\u0397\u0314\u0300\u0345", "\u1F9C"=>"\u0397\u0313\u0301\u0345", "\u1F9D"=>"\u0397\u0314\u0301\u0345", "\u1F9E"=>"\u0397\u0313\u0342\u0345", "\u1F9F"=>"\u0397\u0314\u0342\u0345", "\u1FA0"=>"\u03C9\u0313\u0345", "\u1FA1"=>"\u03C9\u0314\u0345",
"\u1FA2"=>"\u03C9\u0313\u0300\u0345", "\u1FA3"=>"\u03C9\u0314\u0300\u0345", "\u1FA4"=>"\u03C9\u0313\u0301\u0345", "\u1FA5"=>"\u03C9\u0314\u0301\u0345", "\u1FA6"=>"\u03C9\u0313\u0342\u0345", "\u1FA7"=>"\u03C9\u0314\u0342\u0345", "\u1FA8"=>"\u03A9\u0313\u0345", "\u1FA9"=>"\u03A9\u0314\u0345",
"\u1FAA"=>"\u03A9\u0313\u0300\u0345", "\u1FAB"=>"\u03A9\u0314\u0300\u0345", "\u1FAC"=>"\u03A9\u0313\u0301\u0345", "\u1FAD"=>"\u03A9\u0314\u0301\u0345", "\u1FAE"=>"\u03A9\u0313\u0342\u0345", "\u1FAF"=>"\u03A9\u0314\u0342\u0345", "\u1FB0"=>"\u03B1\u0306", "\u1FB1"=>"\u03B1\u0304",
"\u1FB2"=>"\u03B1\u0300\u0345", "\u1FB3"=>"\u03B1\u0345", "\u1FB4"=>"\u03B1\u0301\u0345", "\u1FB6"=>"\u03B1\u0342", "\u1FB7"=>"\u03B1\u0342\u0345", "\u1FB8"=>"\u0391\u0306", "\u1FB9"=>"\u0391\u0304", "\u1FBA"=>"\u0391\u0300",
"\u1FBB"=>"\u0391\u0301", "\u1FBC"=>"\u0391\u0345", "\u1FBE"=>"\u03B9", "\u1FC1"=>"\u00A8\u0342", "\u1FC2"=>"\u03B7\u0300\u0345", "\u1FC3"=>"\u03B7\u0345", "\u1FC4"=>"\u03B7\u0301\u0345", "\u1FC6"=>"\u03B7\u0342",
"\u1FC7"=>"\u03B7\u0342\u0345", "\u1FC8"=>"\u0395\u0300", "\u1FC9"=>"\u0395\u0301", "\u1FCA"=>"\u0397\u0300", "\u1FCB"=>"\u0397\u0301", "\u1FCC"=>"\u0397\u0345", "\u1FCD"=>"\u1FBF\u0300", "\u1FCE"=>"\u1FBF\u0301",
"\u1FCF"=>"\u1FBF\u0342", "\u1FD0"=>"\u03B9\u0306", "\u1FD1"=>"\u03B9\u0304", "\u1FD2"=>"\u03B9\u0308\u0300", "\u1FD3"=>"\u03B9\u0308\u0301", "\u1FD6"=>"\u03B9\u0342", "\u1FD7"=>"\u03B9\u0308\u0342", "\u1FD8"=>"\u0399\u0306",
"\u1FD9"=>"\u0399\u0304", "\u1FDA"=>"\u0399\u0300", "\u1FDB"=>"\u0399\u0301", "\u1FDD"=>"\u1FFE\u0300", "\u1FDE"=>"\u1FFE\u0301", "\u1FDF"=>"\u1FFE\u0342", "\u1FE0"=>"\u03C5\u0306", "\u1FE1"=>"\u03C5\u0304",
"\u1FE2"=>"\u03C5\u0308\u0300", "\u1FE3"=>"\u03C5\u0308\u0301", "\u1FE4"=>"\u03C1\u0313", "\u1FE5"=>"\u03C1\u0314", "\u1FE6"=>"\u03C5\u0342", "\u1FE7"=>"\u03C5\u0308\u0342", "\u1FE8"=>"\u03A5\u0306", "\u1FE9"=>"\u03A5\u0304",
"\u1FEA"=>"\u03A5\u0300", "\u1FEB"=>"\u03A5\u0301", "\u1FEC"=>"\u03A1\u0314", "\u1FED"=>"\u00A8\u0300", "\u1FEE"=>"\u00A8\u0301", "\u1FEF"=>"`", "\u1FF2"=>"\u03C9\u0300\u0345", "\u1FF3"=>"\u03C9\u0345",
"\u1FF4"=>"\u03C9\u0301\u0345", "\u1FF6"=>"\u03C9\u0342", "\u1FF7"=>"\u03C9\u0342\u0345", "\u1FF8"=>"\u039F\u0300", "\u1FF9"=>"\u039F\u0301", "\u1FFA"=>"\u03A9\u0300", "\u1FFB"=>"\u03A9\u0301", "\u1FFC"=>"\u03A9\u0345",
"\u1FFD"=>"\u00B4", "\u2000"=>"\u2002", "\u2001"=>"\u2003", "\u2126"=>"\u03A9", "\u212A"=>"K", "\u212B"=>"A\u030A", "\u219A"=>"\u2190\u0338", "\u219B"=>"\u2192\u0338",
"\u21AE"=>"\u2194\u0338", "\u21CD"=>"\u21D0\u0338", "\u21CE"=>"\u21D4\u0338", "\u21CF"=>"\u21D2\u0338", "\u2204"=>"\u2203\u0338", "\u2209"=>"\u2208\u0338", "\u220C"=>"\u220B\u0338", "\u2224"=>"\u2223\u0338",
"\u2226"=>"\u2225\u0338", "\u2241"=>"\u223C\u0338", "\u2244"=>"\u2243\u0338", "\u2247"=>"\u2245\u0338", "\u2249"=>"\u2248\u0338", "\u2260"=>"=\u0338", "\u2262"=>"\u2261\u0338", "\u226D"=>"\u224D\u0338",
"\u226E"=>"<\u0338", "\u226F"=>">\u0338", "\u2270"=>"\u2264\u0338", "\u2271"=>"\u2265\u0338", "\u2274"=>"\u2272\u0338", "\u2275"=>"\u2273\u0338", "\u2278"=>"\u2276\u0338", "\u2279"=>"\u2277\u0338",
"\u2280"=>"\u227A\u0338", "\u2281"=>"\u227B\u0338", "\u2284"=>"\u2282\u0338", "\u2285"=>"\u2283\u0338", "\u2288"=>"\u2286\u0338", "\u2289"=>"\u2287\u0338", "\u22AC"=>"\u22A2\u0338", "\u22AD"=>"\u22A8\u0338",
"\u22AE"=>"\u22A9\u0338", "\u22AF"=>"\u22AB\u0338", "\u22E0"=>"\u227C\u0338", "\u22E1"=>"\u227D\u0338", "\u22E2"=>"\u2291\u0338", "\u22E3"=>"\u2292\u0338", "\u22EA"=>"\u22B2\u0338", "\u22EB"=>"\u22B3\u0338",
"\u22EC"=>"\u22B4\u0338", "\u22ED"=>"\u22B5\u0338", "\u2329"=>"\u3008", "\u232A"=>"\u3009", "\u2ADC"=>"\u2ADD\u0338", "\u304C"=>"\u304B\u3099", "\u304E"=>"\u304D\u3099", "\u3050"=>"\u304F\u3099",
"\u3052"=>"\u3051\u3099", "\u3054"=>"\u3053\u3099", "\u3056"=>"\u3055\u3099", "\u3058"=>"\u3057\u3099", "\u305A"=>"\u3059\u3099", "\u305C"=>"\u305B\u3099", "\u305E"=>"\u305D\u3099", "\u3060"=>"\u305F\u3099",
"\u3062"=>"\u3061\u3099", "\u3065"=>"\u3064\u3099", "\u3067"=>"\u3066\u3099", "\u3069"=>"\u3068\u3099", "\u3070"=>"\u306F\u3099", "\u3071"=>"\u306F\u309A", "\u3073"=>"\u3072\u3099", "\u3074"=>"\u3072\u309A",
"\u3076"=>"\u3075\u3099", "\u3077"=>"\u3075\u309A", "\u3079"=>"\u3078\u3099", "\u307A"=>"\u3078\u309A", "\u307C"=>"\u307B\u3099", "\u307D"=>"\u307B\u309A", "\u3094"=>"\u3046\u3099", "\u309E"=>"\u309D\u3099",
"\u30AC"=>"\u30AB\u3099", "\u30AE"=>"\u30AD\u3099", "\u30B0"=>"\u30AF\u3099", "\u30B2"=>"\u30B1\u3099", "\u30B4"=>"\u30B3\u3099", "\u30B6"=>"\u30B5\u3099", "\u30B8"=>"\u30B7\u3099", "\u30BA"=>"\u30B9\u3099",
"\u30BC"=>"\u30BB\u3099", "\u30BE"=>"\u30BD\u3099", "\u30C0"=>"\u30BF\u3099", "\u30C2"=>"\u30C1\u3099", "\u30C5"=>"\u30C4\u3099", "\u30C7"=>"\u30C6\u3099", "\u30C9"=>"\u30C8\u3099", "\u30D0"=>"\u30CF\u3099",
"\u30D1"=>"\u30CF\u309A", "\u30D3"=>"\u30D2\u3099", "\u30D4"=>"\u30D2\u309A", "\u30D6"=>"\u30D5\u3099", "\u30D7"=>"\u30D5\u309A", "\u30D9"=>"\u30D8\u3099", "\u30DA"=>"\u30D8\u309A", "\u30DC"=>"\u30DB\u3099",
"\u30DD"=>"\u30DB\u309A", "\u30F4"=>"\u30A6\u3099", "\u30F7"=>"\u30EF\u3099", "\u30F8"=>"\u30F0\u3099", "\u30F9"=>"\u30F1\u3099", "\u30FA"=>"\u30F2\u3099", "\u30FE"=>"\u30FD\u3099", "\uF900"=>"\u8C48",
"\uF901"=>"\u66F4", "\uF902"=>"\u8ECA", "\uF903"=>"\u8CC8", "\uF904"=>"\u6ED1", "\uF905"=>"\u4E32", "\uF906"=>"\u53E5", "\uF907"=>"\u9F9C", "\uF908"=>"\u9F9C",
"\uF909"=>"\u5951", "\uF90A"=>"\u91D1", "\uF90B"=>"\u5587", "\uF90C"=>"\u5948", "\uF90D"=>"\u61F6", "\uF90E"=>"\u7669", "\uF90F"=>"\u7F85", "\uF910"=>"\u863F",
"\uF911"=>"\u87BA", "\uF912"=>"\u88F8", "\uF913"=>"\u908F", "\uF914"=>"\u6A02", "\uF915"=>"\u6D1B", "\uF916"=>"\u70D9", "\uF917"=>"\u73DE", "\uF918"=>"\u843D",
"\uF919"=>"\u916A", "\uF91A"=>"\u99F1", "\uF91B"=>"\u4E82", "\uF91C"=>"\u5375", "\uF91D"=>"\u6B04", "\uF91E"=>"\u721B", "\uF91F"=>"\u862D", "\uF920"=>"\u9E1E",
"\uF921"=>"\u5D50", "\uF922"=>"\u6FEB", "\uF923"=>"\u85CD", "\uF924"=>"\u8964", "\uF925"=>"\u62C9", "\uF926"=>"\u81D8", "\uF927"=>"\u881F", "\uF928"=>"\u5ECA",
"\uF929"=>"\u6717", "\uF92A"=>"\u6D6A", "\uF92B"=>"\u72FC", "\uF92C"=>"\u90CE", "\uF92D"=>"\u4F86", "\uF92E"=>"\u51B7", "\uF92F"=>"\u52DE", "\uF930"=>"\u64C4",
"\uF931"=>"\u6AD3", "\uF932"=>"\u7210", "\uF933"=>"\u76E7", "\uF934"=>"\u8001", "\uF935"=>"\u8606", "\uF936"=>"\u865C", "\uF937"=>"\u8DEF", "\uF938"=>"\u9732",
"\uF939"=>"\u9B6F", "\uF93A"=>"\u9DFA", "\uF93B"=>"\u788C", "\uF93C"=>"\u797F", "\uF93D"=>"\u7DA0", "\uF93E"=>"\u83C9", "\uF93F"=>"\u9304", "\uF940"=>"\u9E7F",
"\uF941"=>"\u8AD6", "\uF942"=>"\u58DF", "\uF943"=>"\u5F04", "\uF944"=>"\u7C60", "\uF945"=>"\u807E", "\uF946"=>"\u7262", "\uF947"=>"\u78CA", "\uF948"=>"\u8CC2",
"\uF949"=>"\u96F7", "\uF94A"=>"\u58D8", "\uF94B"=>"\u5C62", "\uF94C"=>"\u6A13", "\uF94D"=>"\u6DDA", "\uF94E"=>"\u6F0F", "\uF94F"=>"\u7D2F", "\uF950"=>"\u7E37",
"\uF951"=>"\u964B", "\uF952"=>"\u52D2", "\uF953"=>"\u808B", "\uF954"=>"\u51DC", "\uF955"=>"\u51CC", "\uF956"=>"\u7A1C", "\uF957"=>"\u7DBE", "\uF958"=>"\u83F1",
"\uF959"=>"\u9675", "\uF95A"=>"\u8B80", "\uF95B"=>"\u62CF", "\uF95C"=>"\u6A02", "\uF95D"=>"\u8AFE", "\uF95E"=>"\u4E39", "\uF95F"=>"\u5BE7", "\uF960"=>"\u6012",
"\uF961"=>"\u7387", "\uF962"=>"\u7570", "\uF963"=>"\u5317", "\uF964"=>"\u78FB", "\uF965"=>"\u4FBF", "\uF966"=>"\u5FA9", "\uF967"=>"\u4E0D", "\uF968"=>"\u6CCC",
"\uF969"=>"\u6578", "\uF96A"=>"\u7D22", "\uF96B"=>"\u53C3", "\uF96C"=>"\u585E", "\uF96D"=>"\u7701", "\uF96E"=>"\u8449", "\uF96F"=>"\u8AAA", "\uF970"=>"\u6BBA",
"\uF971"=>"\u8FB0", "\uF972"=>"\u6C88", "\uF973"=>"\u62FE", "\uF974"=>"\u82E5", "\uF975"=>"\u63A0", "\uF976"=>"\u7565", "\uF977"=>"\u4EAE", "\uF978"=>"\u5169",
"\uF979"=>"\u51C9", "\uF97A"=>"\u6881", "\uF97B"=>"\u7CE7", "\uF97C"=>"\u826F", "\uF97D"=>"\u8AD2", "\uF97E"=>"\u91CF", "\uF97F"=>"\u52F5", "\uF980"=>"\u5442",
"\uF981"=>"\u5973", "\uF982"=>"\u5EEC", "\uF983"=>"\u65C5", "\uF984"=>"\u6FFE", "\uF985"=>"\u792A", "\uF986"=>"\u95AD", "\uF987"=>"\u9A6A", "\uF988"=>"\u9E97",
"\uF989"=>"\u9ECE", "\uF98A"=>"\u529B", "\uF98B"=>"\u66C6", "\uF98C"=>"\u6B77", "\uF98D"=>"\u8F62", "\uF98E"=>"\u5E74", "\uF98F"=>"\u6190", "\uF990"=>"\u6200",
"\uF991"=>"\u649A", "\uF992"=>"\u6F23", "\uF993"=>"\u7149", "\uF994"=>"\u7489", "\uF995"=>"\u79CA", "\uF996"=>"\u7DF4", "\uF997"=>"\u806F", "\uF998"=>"\u8F26",
"\uF999"=>"\u84EE", "\uF99A"=>"\u9023", "\uF99B"=>"\u934A", "\uF99C"=>"\u5217", "\uF99D"=>"\u52A3", "\uF99E"=>"\u54BD", "\uF99F"=>"\u70C8", "\uF9A0"=>"\u88C2",
"\uF9A1"=>"\u8AAA", "\uF9A2"=>"\u5EC9", "\uF9A3"=>"\u5FF5", "\uF9A4"=>"\u637B", "\uF9A5"=>"\u6BAE", "\uF9A6"=>"\u7C3E", "\uF9A7"=>"\u7375", "\uF9A8"=>"\u4EE4",
"\uF9A9"=>"\u56F9", "\uF9AA"=>"\u5BE7", "\uF9AB"=>"\u5DBA", "\uF9AC"=>"\u601C", "\uF9AD"=>"\u73B2", "\uF9AE"=>"\u7469", "\uF9AF"=>"\u7F9A", "\uF9B0"=>"\u8046",
"\uF9B1"=>"\u9234", "\uF9B2"=>"\u96F6", "\uF9B3"=>"\u9748", "\uF9B4"=>"\u9818", "\uF9B5"=>"\u4F8B", "\uF9B6"=>"\u79AE", "\uF9B7"=>"\u91B4", "\uF9B8"=>"\u96B8",
"\uF9B9"=>"\u60E1", "\uF9BA"=>"\u4E86", "\uF9BB"=>"\u50DA", "\uF9BC"=>"\u5BEE", "\uF9BD"=>"\u5C3F", "\uF9BE"=>"\u6599", "\uF9BF"=>"\u6A02", "\uF9C0"=>"\u71CE",
"\uF9C1"=>"\u7642", "\uF9C2"=>"\u84FC", "\uF9C3"=>"\u907C", "\uF9C4"=>"\u9F8D", "\uF9C5"=>"\u6688", "\uF9C6"=>"\u962E", "\uF9C7"=>"\u5289", "\uF9C8"=>"\u677B",
"\uF9C9"=>"\u67F3", "\uF9CA"=>"\u6D41", "\uF9CB"=>"\u6E9C", "\uF9CC"=>"\u7409", "\uF9CD"=>"\u7559", "\uF9CE"=>"\u786B", "\uF9CF"=>"\u7D10", "\uF9D0"=>"\u985E",
"\uF9D1"=>"\u516D", "\uF9D2"=>"\u622E", "\uF9D3"=>"\u9678", "\uF9D4"=>"\u502B", "\uF9D5"=>"\u5D19", "\uF9D6"=>"\u6DEA", "\uF9D7"=>"\u8F2A", "\uF9D8"=>"\u5F8B",
"\uF9D9"=>"\u6144", "\uF9DA"=>"\u6817", "\uF9DB"=>"\u7387", "\uF9DC"=>"\u9686", "\uF9DD"=>"\u5229", "\uF9DE"=>"\u540F", "\uF9DF"=>"\u5C65", "\uF9E0"=>"\u6613",
"\uF9E1"=>"\u674E", "\uF9E2"=>"\u68A8", "\uF9E3"=>"\u6CE5", "\uF9E4"=>"\u7406", "\uF9E5"=>"\u75E2", "\uF9E6"=>"\u7F79", "\uF9E7"=>"\u88CF", "\uF9E8"=>"\u88E1",
"\uF9E9"=>"\u91CC", "\uF9EA"=>"\u96E2", "\uF9EB"=>"\u533F", "\uF9EC"=>"\u6EBA", "\uF9ED"=>"\u541D", "\uF9EE"=>"\u71D0", "\uF9EF"=>"\u7498", "\uF9F0"=>"\u85FA",
"\uF9F1"=>"\u96A3", "\uF9F2"=>"\u9C57", "\uF9F3"=>"\u9E9F", "\uF9F4"=>"\u6797", "\uF9F5"=>"\u6DCB", "\uF9F6"=>"\u81E8", "\uF9F7"=>"\u7ACB", "\uF9F8"=>"\u7B20",
"\uF9F9"=>"\u7C92", "\uF9FA"=>"\u72C0", "\uF9FB"=>"\u7099", "\uF9FC"=>"\u8B58", "\uF9FD"=>"\u4EC0", "\uF9FE"=>"\u8336", "\uF9FF"=>"\u523A", "\uFA00"=>"\u5207",
"\uFA01"=>"\u5EA6", "\uFA02"=>"\u62D3", "\uFA03"=>"\u7CD6", "\uFA04"=>"\u5B85", "\uFA05"=>"\u6D1E", "\uFA06"=>"\u66B4", "\uFA07"=>"\u8F3B", "\uFA08"=>"\u884C",
"\uFA09"=>"\u964D", "\uFA0A"=>"\u898B", "\uFA0B"=>"\u5ED3", "\uFA0C"=>"\u5140", "\uFA0D"=>"\u55C0", "\uFA10"=>"\u585A", "\uFA12"=>"\u6674", "\uFA15"=>"\u51DE",
"\uFA16"=>"\u732A", "\uFA17"=>"\u76CA", "\uFA18"=>"\u793C", "\uFA19"=>"\u795E", "\uFA1A"=>"\u7965", "\uFA1B"=>"\u798F", "\uFA1C"=>"\u9756", "\uFA1D"=>"\u7CBE",
"\uFA1E"=>"\u7FBD", "\uFA20"=>"\u8612", "\uFA22"=>"\u8AF8", "\uFA25"=>"\u9038", "\uFA26"=>"\u90FD", "\uFA2A"=>"\u98EF", "\uFA2B"=>"\u98FC", "\uFA2C"=>"\u9928",
"\uFA2D"=>"\u9DB4", "\uFA2E"=>"\u90DE", "\uFA2F"=>"\u96B7", "\uFA30"=>"\u4FAE", "\uFA31"=>"\u50E7", "\uFA32"=>"\u514D", "\uFA33"=>"\u52C9", "\uFA34"=>"\u52E4",
"\uFA35"=>"\u5351", "\uFA36"=>"\u559D", "\uFA37"=>"\u5606", "\uFA38"=>"\u5668", "\uFA39"=>"\u5840", "\uFA3A"=>"\u58A8", "\uFA3B"=>"\u5C64", "\uFA3C"=>"\u5C6E",
"\uFA3D"=>"\u6094", "\uFA3E"=>"\u6168", "\uFA3F"=>"\u618E", "\uFA40"=>"\u61F2", "\uFA41"=>"\u654F", "\uFA42"=>"\u65E2", "\uFA43"=>"\u6691", "\uFA44"=>"\u6885",
"\uFA45"=>"\u6D77", "\uFA46"=>"\u6E1A", "\uFA47"=>"\u6F22", "\uFA48"=>"\u716E", "\uFA49"=>"\u722B", "\uFA4A"=>"\u7422", "\uFA4B"=>"\u7891", "\uFA4C"=>"\u793E",
"\uFA4D"=>"\u7949", "\uFA4E"=>"\u7948", "\uFA4F"=>"\u7950", "\uFA50"=>"\u7956", "\uFA51"=>"\u795D", "\uFA52"=>"\u798D", "\uFA53"=>"\u798E", "\uFA54"=>"\u7A40",
"\uFA55"=>"\u7A81", "\uFA56"=>"\u7BC0", "\uFA57"=>"\u7DF4", "\uFA58"=>"\u7E09", "\uFA59"=>"\u7E41", "\uFA5A"=>"\u7F72", "\uFA5B"=>"\u8005", "\uFA5C"=>"\u81ED",
"\uFA5D"=>"\u8279", "\uFA5E"=>"\u8279", "\uFA5F"=>"\u8457", "\uFA60"=>"\u8910", "\uFA61"=>"\u8996", "\uFA62"=>"\u8B01", "\uFA63"=>"\u8B39", "\uFA64"=>"\u8CD3",
"\uFA65"=>"\u8D08", "\uFA66"=>"\u8FB6", "\uFA67"=>"\u9038", "\uFA68"=>"\u96E3", "\uFA69"=>"\u97FF", "\uFA6A"=>"\u983B", "\uFA6B"=>"\u6075", "\uFA6C"=>"\u{242EE}",
"\uFA6D"=>"\u8218", "\uFA70"=>"\u4E26", "\uFA71"=>"\u51B5", "\uFA72"=>"\u5168", "\uFA73"=>"\u4F80", "\uFA74"=>"\u5145", "\uFA75"=>"\u5180", "\uFA76"=>"\u52C7",
"\uFA77"=>"\u52FA", "\uFA78"=>"\u559D", "\uFA79"=>"\u5555", "\uFA7A"=>"\u5599", "\uFA7B"=>"\u55E2", "\uFA7C"=>"\u585A", "\uFA7D"=>"\u58B3", "\uFA7E"=>"\u5944",
"\uFA7F"=>"\u5954", "\uFA80"=>"\u5A62", "\uFA81"=>"\u5B28", "\uFA82"=>"\u5ED2", "\uFA83"=>"\u5ED9", "\uFA84"=>"\u5F69", "\uFA85"=>"\u5FAD", "\uFA86"=>"\u60D8",
"\uFA87"=>"\u614E", "\uFA88"=>"\u6108", "\uFA89"=>"\u618E", "\uFA8A"=>"\u6160", "\uFA8B"=>"\u61F2", "\uFA8C"=>"\u6234", "\uFA8D"=>"\u63C4", "\uFA8E"=>"\u641C",
"\uFA8F"=>"\u6452", "\uFA90"=>"\u6556", "\uFA91"=>"\u6674", "\uFA92"=>"\u6717", "\uFA93"=>"\u671B", "\uFA94"=>"\u6756", "\uFA95"=>"\u6B79", "\uFA96"=>"\u6BBA",
"\uFA97"=>"\u6D41", "\uFA98"=>"\u6EDB", "\uFA99"=>"\u6ECB", "\uFA9A"=>"\u6F22", "\uFA9B"=>"\u701E", "\uFA9C"=>"\u716E", "\uFA9D"=>"\u77A7", "\uFA9E"=>"\u7235",
"\uFA9F"=>"\u72AF", "\uFAA0"=>"\u732A", "\uFAA1"=>"\u7471", "\uFAA2"=>"\u7506", "\uFAA3"=>"\u753B", "\uFAA4"=>"\u761D", "\uFAA5"=>"\u761F", "\uFAA6"=>"\u76CA",
"\uFAA7"=>"\u76DB", "\uFAA8"=>"\u76F4", "\uFAA9"=>"\u774A", "\uFAAA"=>"\u7740", "\uFAAB"=>"\u78CC", "\uFAAC"=>"\u7AB1", "\uFAAD"=>"\u7BC0", "\uFAAE"=>"\u7C7B",
"\uFAAF"=>"\u7D5B", "\uFAB0"=>"\u7DF4", "\uFAB1"=>"\u7F3E", "\uFAB2"=>"\u8005", "\uFAB3"=>"\u8352", "\uFAB4"=>"\u83EF", "\uFAB5"=>"\u8779", "\uFAB6"=>"\u8941",
"\uFAB7"=>"\u8986", "\uFAB8"=>"\u8996", "\uFAB9"=>"\u8ABF", "\uFABA"=>"\u8AF8", "\uFABB"=>"\u8ACB", "\uFABC"=>"\u8B01", "\uFABD"=>"\u8AFE", "\uFABE"=>"\u8AED",
"\uFABF"=>"\u8B39", "\uFAC0"=>"\u8B8A", "\uFAC1"=>"\u8D08", "\uFAC2"=>"\u8F38", "\uFAC3"=>"\u9072", "\uFAC4"=>"\u9199", "\uFAC5"=>"\u9276", "\uFAC6"=>"\u967C",
"\uFAC7"=>"\u96E3", "\uFAC8"=>"\u9756", "\uFAC9"=>"\u97DB", "\uFACA"=>"\u97FF", "\uFACB"=>"\u980B", "\uFACC"=>"\u983B", "\uFACD"=>"\u9B12", "\uFACE"=>"\u9F9C",
"\uFACF"=>"\u{2284A}", "\uFAD0"=>"\u{22844}", "\uFAD1"=>"\u{233D5}", "\uFAD2"=>"\u3B9D", "\uFAD3"=>"\u4018", "\uFAD4"=>"\u4039", "\uFAD5"=>"\u{25249}", "\uFAD6"=>"\u{25CD0}",
"\uFAD7"=>"\u{27ED3}", "\uFAD8"=>"\u9F43", "\uFAD9"=>"\u9F8E", "\uFB1D"=>"\u05D9\u05B4", "\uFB1F"=>"\u05F2\u05B7", "\uFB2A"=>"\u05E9\u05C1", "\uFB2B"=>"\u05E9\u05C2", "\uFB2C"=>"\u05E9\u05BC\u05C1",
"\uFB2D"=>"\u05E9\u05BC\u05C2", "\uFB2E"=>"\u05D0\u05B7", "\uFB2F"=>"\u05D0\u05B8", "\uFB30"=>"\u05D0\u05BC", "\uFB31"=>"\u05D1\u05BC", "\uFB32"=>"\u05D2\u05BC", "\uFB33"=>"\u05D3\u05BC", "\uFB34"=>"\u05D4\u05BC",
"\uFB35"=>"\u05D5\u05BC", "\uFB36"=>"\u05D6\u05BC", "\uFB38"=>"\u05D8\u05BC", "\uFB39"=>"\u05D9\u05BC", "\uFB3A"=>"\u05DA\u05BC", "\uFB3B"=>"\u05DB\u05BC", "\uFB3C"=>"\u05DC\u05BC", "\uFB3E"=>"\u05DE\u05BC",
"\uFB40"=>"\u05E0\u05BC", "\uFB41"=>"\u05E1\u05BC", "\uFB43"=>"\u05E3\u05BC", "\uFB44"=>"\u05E4\u05BC", "\uFB46"=>"\u05E6\u05BC", "\uFB47"=>"\u05E7\u05BC", "\uFB48"=>"\u05E8\u05BC", "\uFB49"=>"\u05E9\u05BC",
"\uFB4A"=>"\u05EA\u05BC", "\uFB4B"=>"\u05D5\u05B9", "\uFB4C"=>"\u05D1\u05BF", "\uFB4D"=>"\u05DB\u05BF", "\uFB4E"=>"\u05E4\u05BF", "\u{1109A}"=>"\u{11099}\u{110BA}", "\u{1109C}"=>"\u{1109B}\u{110BA}", "\u{110AB}"=>"\u{110A5}\u{110BA}",
"\u{1112E}"=>"\u{11131}\u{11127}", "\u{1112F}"=>"\u{11132}\u{11127}", "\u{1134B}"=>"\u{11347}\u{1133E}", "\u{1134C}"=>"\u{11347}\u{11357}", "\u{114BB}"=>"\u{114B9}\u{114BA}", "\u{114BC}"=>"\u{114B9}\u{114B0}", "\u{114BE}"=>"\u{114B9}\u{114BD}", "\u{115BA}"=>"\u{115B8}\u{115AF}",
"\u{115BB}"=>"\u{115B9}\u{115AF}", "\u{1D15E}"=>"\u{1D157}\u{1D165}", "\u{1D15F}"=>"\u{1D158}\u{1D165}", "\u{1D160}"=>"\u{1D158}\u{1D165}\u{1D16E}", "\u{1D161}"=>"\u{1D158}\u{1D165}\u{1D16F}", "\u{1D162}"=>"\u{1D158}\u{1D165}\u{1D170}", "\u{1D163}"=>"\u{1D158}\u{1D165}\u{1D171}", "\u{1D164}"=>"\u{1D158}\u{1D165}\u{1D172}",
"\u{1D1BB}"=>"\u{1D1B9}\u{1D165}", "\u{1D1BC}"=>"\u{1D1BA}\u{1D165}", "\u{1D1BD}"=>"\u{1D1B9}\u{1D165}\u{1D16E}", "\u{1D1BE}"=>"\u{1D1BA}\u{1D165}\u{1D16E}", "\u{1D1BF}"=>"\u{1D1B9}\u{1D165}\u{1D16F}", "\u{1D1C0}"=>"\u{1D1BA}\u{1D165}\u{1D16F}", "\u{2F800}"=>"\u4E3D", "\u{2F801}"=>"\u4E38",
"\u{2F802}"=>"\u4E41", "\u{2F803}"=>"\u{20122}", "\u{2F804}"=>"\u4F60", "\u{2F805}"=>"\u4FAE", "\u{2F806}"=>"\u4FBB", "\u{2F807}"=>"\u5002", "\u{2F808}"=>"\u507A", "\u{2F809}"=>"\u5099",
"\u{2F80A}"=>"\u50E7", "\u{2F80B}"=>"\u50CF", "\u{2F80C}"=>"\u349E", "\u{2F80D}"=>"\u{2063A}", "\u{2F80E}"=>"\u514D", "\u{2F80F}"=>"\u5154", "\u{2F810}"=>"\u5164", "\u{2F811}"=>"\u5177",
"\u{2F812}"=>"\u{2051C}", "\u{2F813}"=>"\u34B9", "\u{2F814}"=>"\u5167", "\u{2F815}"=>"\u518D", "\u{2F816}"=>"\u{2054B}", "\u{2F817}"=>"\u5197", "\u{2F818}"=>"\u51A4", "\u{2F819}"=>"\u4ECC",
"\u{2F81A}"=>"\u51AC", "\u{2F81B}"=>"\u51B5", "\u{2F81C}"=>"\u{291DF}", "\u{2F81D}"=>"\u51F5", "\u{2F81E}"=>"\u5203", "\u{2F81F}"=>"\u34DF", "\u{2F820}"=>"\u523B", "\u{2F821}"=>"\u5246",
"\u{2F822}"=>"\u5272", "\u{2F823}"=>"\u5277", "\u{2F824}"=>"\u3515", "\u{2F825}"=>"\u52C7", "\u{2F826}"=>"\u52C9", "\u{2F827}"=>"\u52E4", "\u{2F828}"=>"\u52FA", "\u{2F829}"=>"\u5305",
"\u{2F82A}"=>"\u5306", "\u{2F82B}"=>"\u5317", "\u{2F82C}"=>"\u5349", "\u{2F82D}"=>"\u5351", "\u{2F82E}"=>"\u535A", "\u{2F82F}"=>"\u5373", "\u{2F830}"=>"\u537D", "\u{2F831}"=>"\u537F",
"\u{2F832}"=>"\u537F", "\u{2F833}"=>"\u537F", "\u{2F834}"=>"\u{20A2C}", "\u{2F835}"=>"\u7070", "\u{2F836}"=>"\u53CA", "\u{2F837}"=>"\u53DF", "\u{2F838}"=>"\u{20B63}", "\u{2F839}"=>"\u53EB",
"\u{2F83A}"=>"\u53F1", "\u{2F83B}"=>"\u5406", "\u{2F83C}"=>"\u549E", "\u{2F83D}"=>"\u5438", "\u{2F83E}"=>"\u5448", "\u{2F83F}"=>"\u5468", "\u{2F840}"=>"\u54A2", "\u{2F841}"=>"\u54F6",
"\u{2F842}"=>"\u5510", "\u{2F843}"=>"\u5553", "\u{2F844}"=>"\u5563", "\u{2F845}"=>"\u5584", "\u{2F846}"=>"\u5584", "\u{2F847}"=>"\u5599", "\u{2F848}"=>"\u55AB", "\u{2F849}"=>"\u55B3",
"\u{2F84A}"=>"\u55C2", "\u{2F84B}"=>"\u5716", "\u{2F84C}"=>"\u5606", "\u{2F84D}"=>"\u5717", "\u{2F84E}"=>"\u5651", "\u{2F84F}"=>"\u5674", "\u{2F850}"=>"\u5207", "\u{2F851}"=>"\u58EE",
"\u{2F852}"=>"\u57CE", "\u{2F853}"=>"\u57F4", "\u{2F854}"=>"\u580D", "\u{2F855}"=>"\u578B", "\u{2F856}"=>"\u5832", "\u{2F857}"=>"\u5831", "\u{2F858}"=>"\u58AC", "\u{2F859}"=>"\u{214E4}",
"\u{2F85A}"=>"\u58F2", "\u{2F85B}"=>"\u58F7", "\u{2F85C}"=>"\u5906", "\u{2F85D}"=>"\u591A", "\u{2F85E}"=>"\u5922", "\u{2F85F}"=>"\u5962", "\u{2F860}"=>"\u{216A8}", "\u{2F861}"=>"\u{216EA}",
"\u{2F862}"=>"\u59EC", "\u{2F863}"=>"\u5A1B", "\u{2F864}"=>"\u5A27", "\u{2F865}"=>"\u59D8", "\u{2F866}"=>"\u5A66", "\u{2F867}"=>"\u36EE", "\u{2F868}"=>"\u36FC", "\u{2F869}"=>"\u5B08",
"\u{2F86A}"=>"\u5B3E", "\u{2F86B}"=>"\u5B3E", "\u{2F86C}"=>"\u{219C8}", "\u{2F86D}"=>"\u5BC3", "\u{2F86E}"=>"\u5BD8", "\u{2F86F}"=>"\u5BE7", "\u{2F870}"=>"\u5BF3", "\u{2F871}"=>"\u{21B18}",
"\u{2F872}"=>"\u5BFF", "\u{2F873}"=>"\u5C06", "\u{2F874}"=>"\u5F53", "\u{2F875}"=>"\u5C22", "\u{2F876}"=>"\u3781", "\u{2F877}"=>"\u5C60", "\u{2F878}"=>"\u5C6E", "\u{2F879}"=>"\u5CC0",
"\u{2F87A}"=>"\u5C8D", "\u{2F87B}"=>"\u{21DE4}", "\u{2F87C}"=>"\u5D43", "\u{2F87D}"=>"\u{21DE6}", "\u{2F87E}"=>"\u5D6E", "\u{2F87F}"=>"\u5D6B", "\u{2F880}"=>"\u5D7C", "\u{2F881}"=>"\u5DE1",
"\u{2F882}"=>"\u5DE2", "\u{2F883}"=>"\u382F", "\u{2F884}"=>"\u5DFD", "\u{2F885}"=>"\u5E28", "\u{2F886}"=>"\u5E3D", "\u{2F887}"=>"\u5E69", "\u{2F888}"=>"\u3862", "\u{2F889}"=>"\u{22183}",
"\u{2F88A}"=>"\u387C", "\u{2F88B}"=>"\u5EB0", "\u{2F88C}"=>"\u5EB3", "\u{2F88D}"=>"\u5EB6", "\u{2F88E}"=>"\u5ECA", "\u{2F88F}"=>"\u{2A392}", "\u{2F890}"=>"\u5EFE", "\u{2F891}"=>"\u{22331}",
"\u{2F892}"=>"\u{22331}", "\u{2F893}"=>"\u8201", "\u{2F894}"=>"\u5F22", "\u{2F895}"=>"\u5F22", "\u{2F896}"=>"\u38C7", "\u{2F897}"=>"\u{232B8}", "\u{2F898}"=>"\u{261DA}", "\u{2F899}"=>"\u5F62",
"\u{2F89A}"=>"\u5F6B", "\u{2F89B}"=>"\u38E3", "\u{2F89C}"=>"\u5F9A", "\u{2F89D}"=>"\u5FCD", "\u{2F89E}"=>"\u5FD7", "\u{2F89F}"=>"\u5FF9", "\u{2F8A0}"=>"\u6081", "\u{2F8A1}"=>"\u393A",
"\u{2F8A2}"=>"\u391C", "\u{2F8A3}"=>"\u6094", "\u{2F8A4}"=>"\u{226D4}", "\u{2F8A5}"=>"\u60C7", "\u{2F8A6}"=>"\u6148", "\u{2F8A7}"=>"\u614C", "\u{2F8A8}"=>"\u614E", "\u{2F8A9}"=>"\u614C",
"\u{2F8AA}"=>"\u617A", "\u{2F8AB}"=>"\u618E", "\u{2F8AC}"=>"\u61B2", "\u{2F8AD}"=>"\u61A4", "\u{2F8AE}"=>"\u61AF", "\u{2F8AF}"=>"\u61DE", "\u{2F8B0}"=>"\u61F2", "\u{2F8B1}"=>"\u61F6",
"\u{2F8B2}"=>"\u6210", "\u{2F8B3}"=>"\u621B", "\u{2F8B4}"=>"\u625D", "\u{2F8B5}"=>"\u62B1", "\u{2F8B6}"=>"\u62D4", "\u{2F8B7}"=>"\u6350", "\u{2F8B8}"=>"\u{22B0C}", "\u{2F8B9}"=>"\u633D",
"\u{2F8BA}"=>"\u62FC", "\u{2F8BB}"=>"\u6368", "\u{2F8BC}"=>"\u6383", "\u{2F8BD}"=>"\u63E4", "\u{2F8BE}"=>"\u{22BF1}", "\u{2F8BF}"=>"\u6422", "\u{2F8C0}"=>"\u63C5", "\u{2F8C1}"=>"\u63A9",
"\u{2F8C2}"=>"\u3A2E", "\u{2F8C3}"=>"\u6469", "\u{2F8C4}"=>"\u647E", "\u{2F8C5}"=>"\u649D", "\u{2F8C6}"=>"\u6477", "\u{2F8C7}"=>"\u3A6C", "\u{2F8C8}"=>"\u654F", "\u{2F8C9}"=>"\u656C",
"\u{2F8CA}"=>"\u{2300A}", "\u{2F8CB}"=>"\u65E3", "\u{2F8CC}"=>"\u66F8", "\u{2F8CD}"=>"\u6649", "\u{2F8CE}"=>"\u3B19", "\u{2F8CF}"=>"\u6691", "\u{2F8D0}"=>"\u3B08", "\u{2F8D1}"=>"\u3AE4",
"\u{2F8D2}"=>"\u5192", "\u{2F8D3}"=>"\u5195", "\u{2F8D4}"=>"\u6700", "\u{2F8D5}"=>"\u669C", "\u{2F8D6}"=>"\u80AD", "\u{2F8D7}"=>"\u43D9", "\u{2F8D8}"=>"\u6717", "\u{2F8D9}"=>"\u671B",
"\u{2F8DA}"=>"\u6721", "\u{2F8DB}"=>"\u675E", "\u{2F8DC}"=>"\u6753", "\u{2F8DD}"=>"\u{233C3}", "\u{2F8DE}"=>"\u3B49", "\u{2F8DF}"=>"\u67FA", "\u{2F8E0}"=>"\u6785", "\u{2F8E1}"=>"\u6852",
"\u{2F8E2}"=>"\u6885", "\u{2F8E3}"=>"\u{2346D}", "\u{2F8E4}"=>"\u688E", "\u{2F8E5}"=>"\u681F", "\u{2F8E6}"=>"\u6914", "\u{2F8E7}"=>"\u3B9D", "\u{2F8E8}"=>"\u6942", "\u{2F8E9}"=>"\u69A3",
"\u{2F8EA}"=>"\u69EA", "\u{2F8EB}"=>"\u6AA8", "\u{2F8EC}"=>"\u{236A3}", "\u{2F8ED}"=>"\u6ADB", "\u{2F8EE}"=>"\u3C18", "\u{2F8EF}"=>"\u6B21", "\u{2F8F0}"=>"\u{238A7}", "\u{2F8F1}"=>"\u6B54",
"\u{2F8F2}"=>"\u3C4E", "\u{2F8F3}"=>"\u6B72", "\u{2F8F4}"=>"\u6B9F", "\u{2F8F5}"=>"\u6BBA", "\u{2F8F6}"=>"\u6BBB", "\u{2F8F7}"=>"\u{23A8D}", "\u{2F8F8}"=>"\u{21D0B}", "\u{2F8F9}"=>"\u{23AFA}",
"\u{2F8FA}"=>"\u6C4E", "\u{2F8FB}"=>"\u{23CBC}", "\u{2F8FC}"=>"\u6CBF", "\u{2F8FD}"=>"\u6CCD", "\u{2F8FE}"=>"\u6C67", "\u{2F8FF}"=>"\u6D16", "\u{2F900}"=>"\u6D3E", "\u{2F901}"=>"\u6D77",
"\u{2F902}"=>"\u6D41", "\u{2F903}"=>"\u6D69", "\u{2F904}"=>"\u6D78", "\u{2F905}"=>"\u6D85", "\u{2F906}"=>"\u{23D1E}", "\u{2F907}"=>"\u6D34", "\u{2F908}"=>"\u6E2F", "\u{2F909}"=>"\u6E6E",
"\u{2F90A}"=>"\u3D33", "\u{2F90B}"=>"\u6ECB", "\u{2F90C}"=>"\u6EC7", "\u{2F90D}"=>"\u{23ED1}", "\u{2F90E}"=>"\u6DF9", "\u{2F90F}"=>"\u6F6E", "\u{2F910}"=>"\u{23F5E}", "\u{2F911}"=>"\u{23F8E}",
"\u{2F912}"=>"\u6FC6", "\u{2F913}"=>"\u7039", "\u{2F914}"=>"\u701E", "\u{2F915}"=>"\u701B", "\u{2F916}"=>"\u3D96", "\u{2F917}"=>"\u704A", "\u{2F918}"=>"\u707D", "\u{2F919}"=>"\u7077",
"\u{2F91A}"=>"\u70AD", "\u{2F91B}"=>"\u{20525}", "\u{2F91C}"=>"\u7145", "\u{2F91D}"=>"\u{24263}", "\u{2F91E}"=>"\u719C", "\u{2F91F}"=>"\u{243AB}", "\u{2F920}"=>"\u7228", "\u{2F921}"=>"\u7235",
"\u{2F922}"=>"\u7250", "\u{2F923}"=>"\u{24608}", "\u{2F924}"=>"\u7280", "\u{2F925}"=>"\u7295", "\u{2F926}"=>"\u{24735}", "\u{2F927}"=>"\u{24814}", "\u{2F928}"=>"\u737A", "\u{2F929}"=>"\u738B",
"\u{2F92A}"=>"\u3EAC", "\u{2F92B}"=>"\u73A5", "\u{2F92C}"=>"\u3EB8", "\u{2F92D}"=>"\u3EB8", "\u{2F92E}"=>"\u7447", "\u{2F92F}"=>"\u745C", "\u{2F930}"=>"\u7471", "\u{2F931}"=>"\u7485",
"\u{2F932}"=>"\u74CA", "\u{2F933}"=>"\u3F1B", "\u{2F934}"=>"\u7524", "\u{2F935}"=>"\u{24C36}", "\u{2F936}"=>"\u753E", "\u{2F937}"=>"\u{24C92}", "\u{2F938}"=>"\u7570", "\u{2F939}"=>"\u{2219F}",
"\u{2F93A}"=>"\u7610", "\u{2F93B}"=>"\u{24FA1}", "\u{2F93C}"=>"\u{24FB8}", "\u{2F93D}"=>"\u{25044}", "\u{2F93E}"=>"\u3FFC", "\u{2F93F}"=>"\u4008", "\u{2F940}"=>"\u76F4", "\u{2F941}"=>"\u{250F3}",
"\u{2F942}"=>"\u{250F2}", "\u{2F943}"=>"\u{25119}", "\u{2F944}"=>"\u{25133}", "\u{2F945}"=>"\u771E", "\u{2F946}"=>"\u771F", "\u{2F947}"=>"\u771F", "\u{2F948}"=>"\u774A", "\u{2F949}"=>"\u4039",
"\u{2F94A}"=>"\u778B", "\u{2F94B}"=>"\u4046", "\u{2F94C}"=>"\u4096", "\u{2F94D}"=>"\u{2541D}", "\u{2F94E}"=>"\u784E", "\u{2F94F}"=>"\u788C", "\u{2F950}"=>"\u78CC", "\u{2F951}"=>"\u40E3",
"\u{2F952}"=>"\u{25626}", "\u{2F953}"=>"\u7956", "\u{2F954}"=>"\u{2569A}", "\u{2F955}"=>"\u{256C5}", "\u{2F956}"=>"\u798F", "\u{2F957}"=>"\u79EB", "\u{2F958}"=>"\u412F", "\u{2F959}"=>"\u7A40",
"\u{2F95A}"=>"\u7A4A", "\u{2F95B}"=>"\u7A4F", "\u{2F95C}"=>"\u{2597C}", "\u{2F95D}"=>"\u{25AA7}", "\u{2F95E}"=>"\u{25AA7}", "\u{2F95F}"=>"\u7AEE", "\u{2F960}"=>"\u4202", "\u{2F961}"=>"\u{25BAB}",
"\u{2F962}"=>"\u7BC6", "\u{2F963}"=>"\u7BC9", "\u{2F964}"=>"\u4227", "\u{2F965}"=>"\u{25C80}", "\u{2F966}"=>"\u7CD2", "\u{2F967}"=>"\u42A0", "\u{2F968}"=>"\u7CE8", "\u{2F969}"=>"\u7CE3",
"\u{2F96A}"=>"\u7D00", "\u{2F96B}"=>"\u{25F86}", "\u{2F96C}"=>"\u7D63", "\u{2F96D}"=>"\u4301", "\u{2F96E}"=>"\u7DC7", "\u{2F96F}"=>"\u7E02", "\u{2F970}"=>"\u7E45", "\u{2F971}"=>"\u4334",
"\u{2F972}"=>"\u{26228}", "\u{2F973}"=>"\u{26247}", "\u{2F974}"=>"\u4359", "\u{2F975}"=>"\u{262D9}", "\u{2F976}"=>"\u7F7A", "\u{2F977}"=>"\u{2633E}", "\u{2F978}"=>"\u7F95", "\u{2F979}"=>"\u7FFA",
"\u{2F97A}"=>"\u8005", "\u{2F97B}"=>"\u{264DA}", "\u{2F97C}"=>"\u{26523}", "\u{2F97D}"=>"\u8060", "\u{2F97E}"=>"\u{265A8}", "\u{2F97F}"=>"\u8070", "\u{2F980}"=>"\u{2335F}", "\u{2F981}"=>"\u43D5",
"\u{2F982}"=>"\u80B2", "\u{2F983}"=>"\u8103", "\u{2F984}"=>"\u440B", "\u{2F985}"=>"\u813E", "\u{2F986}"=>"\u5AB5", "\u{2F987}"=>"\u{267A7}", "\u{2F988}"=>"\u{267B5}", "\u{2F989}"=>"\u{23393}",
"\u{2F98A}"=>"\u{2339C}", "\u{2F98B}"=>"\u8201", "\u{2F98C}"=>"\u8204", "\u{2F98D}"=>"\u8F9E", "\u{2F98E}"=>"\u446B", "\u{2F98F}"=>"\u8291", "\u{2F990}"=>"\u828B", "\u{2F991}"=>"\u829D",
"\u{2F992}"=>"\u52B3", "\u{2F993}"=>"\u82B1", "\u{2F994}"=>"\u82B3", "\u{2F995}"=>"\u82BD", "\u{2F996}"=>"\u82E6", "\u{2F997}"=>"\u{26B3C}", "\u{2F998}"=>"\u82E5", "\u{2F999}"=>"\u831D",
"\u{2F99A}"=>"\u8363", "\u{2F99B}"=>"\u83AD", "\u{2F99C}"=>"\u8323", "\u{2F99D}"=>"\u83BD", "\u{2F99E}"=>"\u83E7", "\u{2F99F}"=>"\u8457", "\u{2F9A0}"=>"\u8353", "\u{2F9A1}"=>"\u83CA",
"\u{2F9A2}"=>"\u83CC", "\u{2F9A3}"=>"\u83DC", "\u{2F9A4}"=>"\u{26C36}", "\u{2F9A5}"=>"\u{26D6B}", "\u{2F9A6}"=>"\u{26CD5}", "\u{2F9A7}"=>"\u452B", "\u{2F9A8}"=>"\u84F1", "\u{2F9A9}"=>"\u84F3",
"\u{2F9AA}"=>"\u8516", "\u{2F9AB}"=>"\u{273CA}", "\u{2F9AC}"=>"\u8564", "\u{2F9AD}"=>"\u{26F2C}", "\u{2F9AE}"=>"\u455D", "\u{2F9AF}"=>"\u4561", "\u{2F9B0}"=>"\u{26FB1}", "\u{2F9B1}"=>"\u{270D2}",
"\u{2F9B2}"=>"\u456B", "\u{2F9B3}"=>"\u8650", "\u{2F9B4}"=>"\u865C", "\u{2F9B5}"=>"\u8667", "\u{2F9B6}"=>"\u8669", "\u{2F9B7}"=>"\u86A9", "\u{2F9B8}"=>"\u8688", "\u{2F9B9}"=>"\u870E",
"\u{2F9BA}"=>"\u86E2", "\u{2F9BB}"=>"\u8779", "\u{2F9BC}"=>"\u8728", "\u{2F9BD}"=>"\u876B", "\u{2F9BE}"=>"\u8786", "\u{2F9BF}"=>"\u45D7", "\u{2F9C0}"=>"\u87E1", "\u{2F9C1}"=>"\u8801",
"\u{2F9C2}"=>"\u45F9", "\u{2F9C3}"=>"\u8860", "\u{2F9C4}"=>"\u8863", "\u{2F9C5}"=>"\u{27667}", "\u{2F9C6}"=>"\u88D7", "\u{2F9C7}"=>"\u88DE", "\u{2F9C8}"=>"\u4635", "\u{2F9C9}"=>"\u88FA",
"\u{2F9CA}"=>"\u34BB", "\u{2F9CB}"=>"\u{278AE}", "\u{2F9CC}"=>"\u{27966}", "\u{2F9CD}"=>"\u46BE", "\u{2F9CE}"=>"\u46C7", "\u{2F9CF}"=>"\u8AA0", "\u{2F9D0}"=>"\u8AED", "\u{2F9D1}"=>"\u8B8A",
"\u{2F9D2}"=>"\u8C55", "\u{2F9D3}"=>"\u{27CA8}", "\u{2F9D4}"=>"\u8CAB", "\u{2F9D5}"=>"\u8CC1", "\u{2F9D6}"=>"\u8D1B", "\u{2F9D7}"=>"\u8D77", "\u{2F9D8}"=>"\u{27F2F}", "\u{2F9D9}"=>"\u{20804}",
"\u{2F9DA}"=>"\u8DCB", "\u{2F9DB}"=>"\u8DBC", "\u{2F9DC}"=>"\u8DF0", "\u{2F9DD}"=>"\u{208DE}", "\u{2F9DE}"=>"\u8ED4", "\u{2F9DF}"=>"\u8F38", "\u{2F9E0}"=>"\u{285D2}", "\u{2F9E1}"=>"\u{285ED}",
"\u{2F9E2}"=>"\u9094", "\u{2F9E3}"=>"\u90F1", "\u{2F9E4}"=>"\u9111", "\u{2F9E5}"=>"\u{2872E}", "\u{2F9E6}"=>"\u911B", "\u{2F9E7}"=>"\u9238", "\u{2F9E8}"=>"\u92D7", "\u{2F9E9}"=>"\u92D8",
"\u{2F9EA}"=>"\u927C", "\u{2F9EB}"=>"\u93F9", "\u{2F9EC}"=>"\u9415", "\u{2F9ED}"=>"\u{28BFA}", "\u{2F9EE}"=>"\u958B", "\u{2F9EF}"=>"\u4995", "\u{2F9F0}"=>"\u95B7", "\u{2F9F1}"=>"\u{28D77}",
"\u{2F9F2}"=>"\u49E6", "\u{2F9F3}"=>"\u96C3", "\u{2F9F4}"=>"\u5DB2", "\u{2F9F5}"=>"\u9723", "\u{2F9F6}"=>"\u{29145}", "\u{2F9F7}"=>"\u{2921A}", "\u{2F9F8}"=>"\u4A6E", "\u{2F9F9}"=>"\u4A76",
"\u{2F9FA}"=>"\u97E0", "\u{2F9FB}"=>"\u{2940A}", "\u{2F9FC}"=>"\u4AB2", "\u{2F9FD}"=>"\u{29496}", "\u{2F9FE}"=>"\u980B", "\u{2F9FF}"=>"\u980B", "\u{2FA00}"=>"\u9829", "\u{2FA01}"=>"\u{295B6}",
"\u{2FA02}"=>"\u98E2", "\u{2FA03}"=>"\u4B33", "\u{2FA04}"=>"\u9929", "\u{2FA05}"=>"\u99A7", "\u{2FA06}"=>"\u99C2", "\u{2FA07}"=>"\u99FE", "\u{2FA08}"=>"\u4BCE", "\u{2FA09}"=>"\u{29B30}",
"\u{2FA0A}"=>"\u9B12", "\u{2FA0B}"=>"\u9C40", "\u{2FA0C}"=>"\u9CFD", "\u{2FA0D}"=>"\u4CCE", "\u{2FA0E}"=>"\u4CED", "\u{2FA0F}"=>"\u9D67", "\u{2FA10}"=>"\u{2A0CE}", "\u{2FA11}"=>"\u4CF8",
"\u{2FA12}"=>"\u{2A105}", "\u{2FA13}"=>"\u{2A20E}", "\u{2FA14}"=>"\u{2A291}", "\u{2FA15}"=>"\u9EBB", "\u{2FA16}"=>"\u4D56", "\u{2FA17}"=>"\u9EF9", "\u{2FA18}"=>"\u9EFE", "\u{2FA19}"=>"\u9F05",
"\u{2FA1A}"=>"\u9F0F", "\u{2FA1B}"=>"\u9F16", "\u{2FA1C}"=>"\u9F3B", "\u{2FA1D}"=>"\u{2A600}",
}.freeze
KOMPATIBLE_TABLE = {
"\u00A0"=>" ", "\u00A8"=>" \u0308", "\u00AA"=>"a", "\u00AF"=>" \u0304", "\u00B2"=>"2", "\u00B3"=>"3", "\u00B4"=>" \u0301", "\u00B5"=>"\u03BC",
"\u00B8"=>" \u0327", "\u00B9"=>"1", "\u00BA"=>"o", "\u00BC"=>"1\u20444", "\u00BD"=>"1\u20442", "\u00BE"=>"3\u20444", "\u0132"=>"IJ", "\u0133"=>"ij",
"\u013F"=>"L\u00B7", "\u0140"=>"l\u00B7", "\u0149"=>"\u02BCn", "\u017F"=>"s", "\u01C4"=>"D\u017D", "\u01C5"=>"D\u017E", "\u01C6"=>"d\u017E", "\u01C7"=>"LJ",
"\u01C8"=>"Lj", "\u01C9"=>"lj", "\u01CA"=>"NJ", "\u01CB"=>"Nj", "\u01CC"=>"nj", "\u01F1"=>"DZ", "\u01F2"=>"Dz", "\u01F3"=>"dz",
"\u02B0"=>"h", "\u02B1"=>"\u0266", "\u02B2"=>"j", "\u02B3"=>"r", "\u02B4"=>"\u0279", "\u02B5"=>"\u027B", "\u02B6"=>"\u0281", "\u02B7"=>"w",
"\u02B8"=>"y", "\u02D8"=>" \u0306", "\u02D9"=>" \u0307", "\u02DA"=>" \u030A", "\u02DB"=>" \u0328", "\u02DC"=>" \u0303", "\u02DD"=>" \u030B", "\u02E0"=>"\u0263",
"\u02E1"=>"l", "\u02E2"=>"s", "\u02E3"=>"x", "\u02E4"=>"\u0295", "\u037A"=>" \u0345", "\u0384"=>" \u0301", "\u03D0"=>"\u03B2", "\u03D1"=>"\u03B8",
"\u03D2"=>"\u03A5", "\u03D5"=>"\u03C6", "\u03D6"=>"\u03C0", "\u03F0"=>"\u03BA", "\u03F1"=>"\u03C1", "\u03F2"=>"\u03C2", "\u03F4"=>"\u0398", "\u03F5"=>"\u03B5",
"\u03F9"=>"\u03A3", "\u0587"=>"\u0565\u0582", "\u0675"=>"\u0627\u0674", "\u0676"=>"\u0648\u0674", "\u0677"=>"\u06C7\u0674", "\u0678"=>"\u064A\u0674", "\u0E33"=>"\u0E4D\u0E32", "\u0EB3"=>"\u0ECD\u0EB2",
"\u0EDC"=>"\u0EAB\u0E99", "\u0EDD"=>"\u0EAB\u0EA1", "\u0F0C"=>"\u0F0B", "\u0F77"=>"\u0FB2\u0F81", "\u0F79"=>"\u0FB3\u0F81", "\u10FC"=>"\u10DC", "\u1D2C"=>"A", "\u1D2D"=>"\u00C6",
"\u1D2E"=>"B", "\u1D30"=>"D", "\u1D31"=>"E", "\u1D32"=>"\u018E", "\u1D33"=>"G", "\u1D34"=>"H", "\u1D35"=>"I", "\u1D36"=>"J",
"\u1D37"=>"K", "\u1D38"=>"L", "\u1D39"=>"M", "\u1D3A"=>"N", "\u1D3C"=>"O", "\u1D3D"=>"\u0222", "\u1D3E"=>"P", "\u1D3F"=>"R",
"\u1D40"=>"T", "\u1D41"=>"U", "\u1D42"=>"W", "\u1D43"=>"a", "\u1D44"=>"\u0250", "\u1D45"=>"\u0251", "\u1D46"=>"\u1D02", "\u1D47"=>"b",
"\u1D48"=>"d", "\u1D49"=>"e", "\u1D4A"=>"\u0259", "\u1D4B"=>"\u025B", "\u1D4C"=>"\u025C", "\u1D4D"=>"g", "\u1D4F"=>"k", "\u1D50"=>"m",
"\u1D51"=>"\u014B", "\u1D52"=>"o", "\u1D53"=>"\u0254", "\u1D54"=>"\u1D16", "\u1D55"=>"\u1D17", "\u1D56"=>"p", "\u1D57"=>"t", "\u1D58"=>"u",
"\u1D59"=>"\u1D1D", "\u1D5A"=>"\u026F", "\u1D5B"=>"v", "\u1D5C"=>"\u1D25", "\u1D5D"=>"\u03B2", "\u1D5E"=>"\u03B3", "\u1D5F"=>"\u03B4", "\u1D60"=>"\u03C6",
"\u1D61"=>"\u03C7", "\u1D62"=>"i", "\u1D63"=>"r", "\u1D64"=>"u", "\u1D65"=>"v", "\u1D66"=>"\u03B2", "\u1D67"=>"\u03B3", "\u1D68"=>"\u03C1",
"\u1D69"=>"\u03C6", "\u1D6A"=>"\u03C7", "\u1D78"=>"\u043D", "\u1D9B"=>"\u0252", "\u1D9C"=>"c", "\u1D9D"=>"\u0255", "\u1D9E"=>"\u00F0", "\u1D9F"=>"\u025C",
"\u1DA0"=>"f", "\u1DA1"=>"\u025F", "\u1DA2"=>"\u0261", "\u1DA3"=>"\u0265", "\u1DA4"=>"\u0268", "\u1DA5"=>"\u0269", "\u1DA6"=>"\u026A", "\u1DA7"=>"\u1D7B",
"\u1DA8"=>"\u029D", "\u1DA9"=>"\u026D", "\u1DAA"=>"\u1D85", "\u1DAB"=>"\u029F", "\u1DAC"=>"\u0271", "\u1DAD"=>"\u0270", "\u1DAE"=>"\u0272", "\u1DAF"=>"\u0273",
"\u1DB0"=>"\u0274", "\u1DB1"=>"\u0275", "\u1DB2"=>"\u0278", "\u1DB3"=>"\u0282", "\u1DB4"=>"\u0283", "\u1DB5"=>"\u01AB", "\u1DB6"=>"\u0289", "\u1DB7"=>"\u028A",
"\u1DB8"=>"\u1D1C", "\u1DB9"=>"\u028B", "\u1DBA"=>"\u028C", "\u1DBB"=>"z", "\u1DBC"=>"\u0290", "\u1DBD"=>"\u0291", "\u1DBE"=>"\u0292", "\u1DBF"=>"\u03B8",
"\u1E9A"=>"a\u02BE", "\u1FBD"=>" \u0313", "\u1FBF"=>" \u0313", "\u1FC0"=>" \u0342", "\u1FFE"=>" \u0314", "\u2002"=>" ", "\u2003"=>" ", "\u2004"=>" ",
"\u2005"=>" ", "\u2006"=>" ", "\u2007"=>" ", "\u2008"=>" ", "\u2009"=>" ", "\u200A"=>" ", "\u2011"=>"\u2010", "\u2017"=>" \u0333",
"\u2024"=>".", "\u2025"=>"..", "\u2026"=>"...", "\u202F"=>" ", "\u2033"=>"\u2032\u2032", "\u2034"=>"\u2032\u2032\u2032", "\u2036"=>"\u2035\u2035", "\u2037"=>"\u2035\u2035\u2035",
"\u203C"=>"!!", "\u203E"=>" \u0305", "\u2047"=>"??", "\u2048"=>"?!", "\u2049"=>"!?", "\u2057"=>"\u2032\u2032\u2032\u2032", "\u205F"=>" ", "\u2070"=>"0",
"\u2071"=>"i", "\u2074"=>"4", "\u2075"=>"5", "\u2076"=>"6", "\u2077"=>"7", "\u2078"=>"8", "\u2079"=>"9", "\u207A"=>"+",
"\u207B"=>"\u2212", "\u207C"=>"=", "\u207D"=>"(", "\u207E"=>")", "\u207F"=>"n", "\u2080"=>"0", "\u2081"=>"1", "\u2082"=>"2",
"\u2083"=>"3", "\u2084"=>"4", "\u2085"=>"5", "\u2086"=>"6", "\u2087"=>"7", "\u2088"=>"8", "\u2089"=>"9", "\u208A"=>"+",
"\u208B"=>"\u2212", "\u208C"=>"=", "\u208D"=>"(", "\u208E"=>")", "\u2090"=>"a", "\u2091"=>"e", "\u2092"=>"o", "\u2093"=>"x",
"\u2094"=>"\u0259", "\u2095"=>"h", "\u2096"=>"k", "\u2097"=>"l", "\u2098"=>"m", "\u2099"=>"n", "\u209A"=>"p", "\u209B"=>"s",
"\u209C"=>"t", "\u20A8"=>"Rs", "\u2100"=>"a/c", "\u2101"=>"a/s", "\u2102"=>"C", "\u2103"=>"\u00B0C", "\u2105"=>"c/o", "\u2106"=>"c/u",
"\u2107"=>"\u0190", "\u2109"=>"\u00B0F", "\u210A"=>"g", "\u210B"=>"H", "\u210C"=>"H", "\u210D"=>"H", "\u210E"=>"h", "\u210F"=>"\u0127",
"\u2110"=>"I", "\u2111"=>"I", "\u2112"=>"L", "\u2113"=>"l", "\u2115"=>"N", "\u2116"=>"No", "\u2119"=>"P", "\u211A"=>"Q",
"\u211B"=>"R", "\u211C"=>"R", "\u211D"=>"R", "\u2120"=>"SM", "\u2121"=>"TEL", "\u2122"=>"TM", "\u2124"=>"Z", "\u2128"=>"Z",
"\u212C"=>"B", "\u212D"=>"C", "\u212F"=>"e", "\u2130"=>"E", "\u2131"=>"F", "\u2133"=>"M", "\u2134"=>"o", "\u2135"=>"\u05D0",
"\u2136"=>"\u05D1", "\u2137"=>"\u05D2", "\u2138"=>"\u05D3", "\u2139"=>"i", "\u213B"=>"FAX", "\u213C"=>"\u03C0", "\u213D"=>"\u03B3", "\u213E"=>"\u0393",
"\u213F"=>"\u03A0", "\u2140"=>"\u2211", "\u2145"=>"D", "\u2146"=>"d", "\u2147"=>"e", "\u2148"=>"i", "\u2149"=>"j", "\u2150"=>"1\u20447",
"\u2151"=>"1\u20449", "\u2152"=>"1\u204410", "\u2153"=>"1\u20443", "\u2154"=>"2\u20443", "\u2155"=>"1\u20445", "\u2156"=>"2\u20445", "\u2157"=>"3\u20445", "\u2158"=>"4\u20445",
"\u2159"=>"1\u20446", "\u215A"=>"5\u20446", "\u215B"=>"1\u20448", "\u215C"=>"3\u20448", "\u215D"=>"5\u20448", "\u215E"=>"7\u20448", "\u215F"=>"1\u2044", "\u2160"=>"I",
"\u2161"=>"II", "\u2162"=>"III", "\u2163"=>"IV", "\u2164"=>"V", "\u2165"=>"VI", "\u2166"=>"VII", "\u2167"=>"VIII", "\u2168"=>"IX",
"\u2169"=>"X", "\u216A"=>"XI", "\u216B"=>"XII", "\u216C"=>"L", "\u216D"=>"C", "\u216E"=>"D", "\u216F"=>"M", "\u2170"=>"i",
"\u2171"=>"ii", "\u2172"=>"iii", "\u2173"=>"iv", "\u2174"=>"v", "\u2175"=>"vi", "\u2176"=>"vii", "\u2177"=>"viii", "\u2178"=>"ix",
"\u2179"=>"x", "\u217A"=>"xi", "\u217B"=>"xii", "\u217C"=>"l", "\u217D"=>"c", "\u217E"=>"d", "\u217F"=>"m", "\u2189"=>"0\u20443",
"\u222C"=>"\u222B\u222B", "\u222D"=>"\u222B\u222B\u222B", "\u222F"=>"\u222E\u222E", "\u2230"=>"\u222E\u222E\u222E", "\u2460"=>"1", "\u2461"=>"2", "\u2462"=>"3", "\u2463"=>"4",
"\u2464"=>"5", "\u2465"=>"6", "\u2466"=>"7", "\u2467"=>"8", "\u2468"=>"9", "\u2469"=>"10", "\u246A"=>"11", "\u246B"=>"12",
"\u246C"=>"13", "\u246D"=>"14", "\u246E"=>"15", "\u246F"=>"16", "\u2470"=>"17", "\u2471"=>"18", "\u2472"=>"19", "\u2473"=>"20",
"\u2474"=>"(1)", "\u2475"=>"(2)", "\u2476"=>"(3)", "\u2477"=>"(4)", "\u2478"=>"(5)", "\u2479"=>"(6)", "\u247A"=>"(7)", "\u247B"=>"(8)",
"\u247C"=>"(9)", "\u247D"=>"(10)", "\u247E"=>"(11)", "\u247F"=>"(12)", "\u2480"=>"(13)", "\u2481"=>"(14)", "\u2482"=>"(15)", "\u2483"=>"(16)",
"\u2484"=>"(17)", "\u2485"=>"(18)", "\u2486"=>"(19)", "\u2487"=>"(20)", "\u2488"=>"1.", "\u2489"=>"2.", "\u248A"=>"3.", "\u248B"=>"4.",
"\u248C"=>"5.", "\u248D"=>"6.", "\u248E"=>"7.", "\u248F"=>"8.", "\u2490"=>"9.", "\u2491"=>"10.", "\u2492"=>"11.", "\u2493"=>"12.",
"\u2494"=>"13.", "\u2495"=>"14.", "\u2496"=>"15.", "\u2497"=>"16.", "\u2498"=>"17.", "\u2499"=>"18.", "\u249A"=>"19.", "\u249B"=>"20.",
"\u249C"=>"(a)", "\u249D"=>"(b)", "\u249E"=>"(c)", "\u249F"=>"(d)", "\u24A0"=>"(e)", "\u24A1"=>"(f)", "\u24A2"=>"(g)", "\u24A3"=>"(h)",
"\u24A4"=>"(i)", "\u24A5"=>"(j)", "\u24A6"=>"(k)", "\u24A7"=>"(l)", "\u24A8"=>"(m)", "\u24A9"=>"(n)", "\u24AA"=>"(o)", "\u24AB"=>"(p)",
"\u24AC"=>"(q)", "\u24AD"=>"(r)", "\u24AE"=>"(s)", "\u24AF"=>"(t)", "\u24B0"=>"(u)", "\u24B1"=>"(v)", "\u24B2"=>"(w)", "\u24B3"=>"(x)",
"\u24B4"=>"(y)", "\u24B5"=>"(z)", "\u24B6"=>"A", "\u24B7"=>"B", "\u24B8"=>"C", "\u24B9"=>"D", "\u24BA"=>"E", "\u24BB"=>"F",
"\u24BC"=>"G", "\u24BD"=>"H", "\u24BE"=>"I", "\u24BF"=>"J", "\u24C0"=>"K", "\u24C1"=>"L", "\u24C2"=>"M", "\u24C3"=>"N",
"\u24C4"=>"O", "\u24C5"=>"P", "\u24C6"=>"Q", "\u24C7"=>"R", "\u24C8"=>"S", "\u24C9"=>"T", "\u24CA"=>"U", "\u24CB"=>"V",
"\u24CC"=>"W", "\u24CD"=>"X", "\u24CE"=>"Y", "\u24CF"=>"Z", "\u24D0"=>"a", "\u24D1"=>"b", "\u24D2"=>"c", "\u24D3"=>"d",
"\u24D4"=>"e", "\u24D5"=>"f", "\u24D6"=>"g", "\u24D7"=>"h", "\u24D8"=>"i", "\u24D9"=>"j", "\u24DA"=>"k", "\u24DB"=>"l",
"\u24DC"=>"m", "\u24DD"=>"n", "\u24DE"=>"o", "\u24DF"=>"p", "\u24E0"=>"q", "\u24E1"=>"r", "\u24E2"=>"s", "\u24E3"=>"t",
"\u24E4"=>"u", "\u24E5"=>"v", "\u24E6"=>"w", "\u24E7"=>"x", "\u24E8"=>"y", "\u24E9"=>"z", "\u24EA"=>"0", "\u2A0C"=>"\u222B\u222B\u222B\u222B",
"\u2A74"=>"::=", "\u2A75"=>"==", "\u2A76"=>"===", "\u2C7C"=>"j", "\u2C7D"=>"V", "\u2D6F"=>"\u2D61", "\u2E9F"=>"\u6BCD", "\u2EF3"=>"\u9F9F",
"\u2F00"=>"\u4E00", "\u2F01"=>"\u4E28", "\u2F02"=>"\u4E36", "\u2F03"=>"\u4E3F", "\u2F04"=>"\u4E59", "\u2F05"=>"\u4E85", "\u2F06"=>"\u4E8C", "\u2F07"=>"\u4EA0",
"\u2F08"=>"\u4EBA", "\u2F09"=>"\u513F", "\u2F0A"=>"\u5165", "\u2F0B"=>"\u516B", "\u2F0C"=>"\u5182", "\u2F0D"=>"\u5196", "\u2F0E"=>"\u51AB", "\u2F0F"=>"\u51E0",
"\u2F10"=>"\u51F5", "\u2F11"=>"\u5200", "\u2F12"=>"\u529B", "\u2F13"=>"\u52F9", "\u2F14"=>"\u5315", "\u2F15"=>"\u531A", "\u2F16"=>"\u5338", "\u2F17"=>"\u5341",
"\u2F18"=>"\u535C", "\u2F19"=>"\u5369", "\u2F1A"=>"\u5382", "\u2F1B"=>"\u53B6", "\u2F1C"=>"\u53C8", "\u2F1D"=>"\u53E3", "\u2F1E"=>"\u56D7", "\u2F1F"=>"\u571F",
"\u2F20"=>"\u58EB", "\u2F21"=>"\u5902", "\u2F22"=>"\u590A", "\u2F23"=>"\u5915", "\u2F24"=>"\u5927", "\u2F25"=>"\u5973", "\u2F26"=>"\u5B50", "\u2F27"=>"\u5B80",
"\u2F28"=>"\u5BF8", "\u2F29"=>"\u5C0F", "\u2F2A"=>"\u5C22", "\u2F2B"=>"\u5C38", "\u2F2C"=>"\u5C6E", "\u2F2D"=>"\u5C71", "\u2F2E"=>"\u5DDB", "\u2F2F"=>"\u5DE5",
"\u2F30"=>"\u5DF1", "\u2F31"=>"\u5DFE", "\u2F32"=>"\u5E72", "\u2F33"=>"\u5E7A", "\u2F34"=>"\u5E7F", "\u2F35"=>"\u5EF4", "\u2F36"=>"\u5EFE", "\u2F37"=>"\u5F0B",
"\u2F38"=>"\u5F13", "\u2F39"=>"\u5F50", "\u2F3A"=>"\u5F61", "\u2F3B"=>"\u5F73", "\u2F3C"=>"\u5FC3", "\u2F3D"=>"\u6208", "\u2F3E"=>"\u6236", "\u2F3F"=>"\u624B",
"\u2F40"=>"\u652F", "\u2F41"=>"\u6534", "\u2F42"=>"\u6587", "\u2F43"=>"\u6597", "\u2F44"=>"\u65A4", "\u2F45"=>"\u65B9", "\u2F46"=>"\u65E0", "\u2F47"=>"\u65E5",
"\u2F48"=>"\u66F0", "\u2F49"=>"\u6708", "\u2F4A"=>"\u6728", "\u2F4B"=>"\u6B20", "\u2F4C"=>"\u6B62", "\u2F4D"=>"\u6B79", "\u2F4E"=>"\u6BB3", "\u2F4F"=>"\u6BCB",
"\u2F50"=>"\u6BD4", "\u2F51"=>"\u6BDB", "\u2F52"=>"\u6C0F", "\u2F53"=>"\u6C14", "\u2F54"=>"\u6C34", "\u2F55"=>"\u706B", "\u2F56"=>"\u722A", "\u2F57"=>"\u7236",
"\u2F58"=>"\u723B", "\u2F59"=>"\u723F", "\u2F5A"=>"\u7247", "\u2F5B"=>"\u7259", "\u2F5C"=>"\u725B", "\u2F5D"=>"\u72AC", "\u2F5E"=>"\u7384", "\u2F5F"=>"\u7389",
"\u2F60"=>"\u74DC", "\u2F61"=>"\u74E6", "\u2F62"=>"\u7518", "\u2F63"=>"\u751F", "\u2F64"=>"\u7528", "\u2F65"=>"\u7530", "\u2F66"=>"\u758B", "\u2F67"=>"\u7592",
"\u2F68"=>"\u7676", "\u2F69"=>"\u767D", "\u2F6A"=>"\u76AE", "\u2F6B"=>"\u76BF", "\u2F6C"=>"\u76EE", "\u2F6D"=>"\u77DB", "\u2F6E"=>"\u77E2", "\u2F6F"=>"\u77F3",
"\u2F70"=>"\u793A", "\u2F71"=>"\u79B8", "\u2F72"=>"\u79BE", "\u2F73"=>"\u7A74", "\u2F74"=>"\u7ACB", "\u2F75"=>"\u7AF9", "\u2F76"=>"\u7C73", "\u2F77"=>"\u7CF8",
"\u2F78"=>"\u7F36", "\u2F79"=>"\u7F51", "\u2F7A"=>"\u7F8A", "\u2F7B"=>"\u7FBD", "\u2F7C"=>"\u8001", "\u2F7D"=>"\u800C", "\u2F7E"=>"\u8012", "\u2F7F"=>"\u8033",
"\u2F80"=>"\u807F", "\u2F81"=>"\u8089", "\u2F82"=>"\u81E3", "\u2F83"=>"\u81EA", "\u2F84"=>"\u81F3", "\u2F85"=>"\u81FC", "\u2F86"=>"\u820C", "\u2F87"=>"\u821B",
"\u2F88"=>"\u821F", "\u2F89"=>"\u826E", "\u2F8A"=>"\u8272", "\u2F8B"=>"\u8278", "\u2F8C"=>"\u864D", "\u2F8D"=>"\u866B", "\u2F8E"=>"\u8840", "\u2F8F"=>"\u884C",
"\u2F90"=>"\u8863", "\u2F91"=>"\u897E", "\u2F92"=>"\u898B", "\u2F93"=>"\u89D2", "\u2F94"=>"\u8A00", "\u2F95"=>"\u8C37", "\u2F96"=>"\u8C46", "\u2F97"=>"\u8C55",
"\u2F98"=>"\u8C78", "\u2F99"=>"\u8C9D", "\u2F9A"=>"\u8D64", "\u2F9B"=>"\u8D70", "\u2F9C"=>"\u8DB3", "\u2F9D"=>"\u8EAB", "\u2F9E"=>"\u8ECA", "\u2F9F"=>"\u8F9B",
"\u2FA0"=>"\u8FB0", "\u2FA1"=>"\u8FB5", "\u2FA2"=>"\u9091", "\u2FA3"=>"\u9149", "\u2FA4"=>"\u91C6", "\u2FA5"=>"\u91CC", "\u2FA6"=>"\u91D1", "\u2FA7"=>"\u9577",
"\u2FA8"=>"\u9580", "\u2FA9"=>"\u961C", "\u2FAA"=>"\u96B6", "\u2FAB"=>"\u96B9", "\u2FAC"=>"\u96E8", "\u2FAD"=>"\u9751", "\u2FAE"=>"\u975E", "\u2FAF"=>"\u9762",
"\u2FB0"=>"\u9769", "\u2FB1"=>"\u97CB", "\u2FB2"=>"\u97ED", "\u2FB3"=>"\u97F3", "\u2FB4"=>"\u9801", "\u2FB5"=>"\u98A8", "\u2FB6"=>"\u98DB", "\u2FB7"=>"\u98DF",
"\u2FB8"=>"\u9996", "\u2FB9"=>"\u9999", "\u2FBA"=>"\u99AC", "\u2FBB"=>"\u9AA8", "\u2FBC"=>"\u9AD8", "\u2FBD"=>"\u9ADF", "\u2FBE"=>"\u9B25", "\u2FBF"=>"\u9B2F",
"\u2FC0"=>"\u9B32", "\u2FC1"=>"\u9B3C", "\u2FC2"=>"\u9B5A", "\u2FC3"=>"\u9CE5", "\u2FC4"=>"\u9E75", "\u2FC5"=>"\u9E7F", "\u2FC6"=>"\u9EA5", "\u2FC7"=>"\u9EBB",
"\u2FC8"=>"\u9EC3", "\u2FC9"=>"\u9ECD", "\u2FCA"=>"\u9ED1", "\u2FCB"=>"\u9EF9", "\u2FCC"=>"\u9EFD", "\u2FCD"=>"\u9F0E", "\u2FCE"=>"\u9F13", "\u2FCF"=>"\u9F20",
"\u2FD0"=>"\u9F3B", "\u2FD1"=>"\u9F4A", "\u2FD2"=>"\u9F52", "\u2FD3"=>"\u9F8D", "\u2FD4"=>"\u9F9C", "\u2FD5"=>"\u9FA0", "\u3000"=>" ", "\u3036"=>"\u3012",
"\u3038"=>"\u5341", "\u3039"=>"\u5344", "\u303A"=>"\u5345", "\u309B"=>" \u3099", "\u309C"=>" \u309A", "\u309F"=>"\u3088\u308A", "\u30FF"=>"\u30B3\u30C8", "\u3131"=>"\u1100",
"\u3132"=>"\u1101", "\u3133"=>"\u11AA", "\u3134"=>"\u1102", "\u3135"=>"\u11AC", "\u3136"=>"\u11AD", "\u3137"=>"\u1103", "\u3138"=>"\u1104", "\u3139"=>"\u1105",
"\u313A"=>"\u11B0", "\u313B"=>"\u11B1", "\u313C"=>"\u11B2", "\u313D"=>"\u11B3", "\u313E"=>"\u11B4", "\u313F"=>"\u11B5", "\u3140"=>"\u111A", "\u3141"=>"\u1106",
"\u3142"=>"\u1107", "\u3143"=>"\u1108", "\u3144"=>"\u1121", "\u3145"=>"\u1109", "\u3146"=>"\u110A", "\u3147"=>"\u110B", "\u3148"=>"\u110C", "\u3149"=>"\u110D",
"\u314A"=>"\u110E", "\u314B"=>"\u110F", "\u314C"=>"\u1110", "\u314D"=>"\u1111", "\u314E"=>"\u1112", "\u314F"=>"\u1161", "\u3150"=>"\u1162", "\u3151"=>"\u1163",
"\u3152"=>"\u1164", "\u3153"=>"\u1165", "\u3154"=>"\u1166", "\u3155"=>"\u1167", "\u3156"=>"\u1168", "\u3157"=>"\u1169", "\u3158"=>"\u116A", "\u3159"=>"\u116B",
"\u315A"=>"\u116C", "\u315B"=>"\u116D", "\u315C"=>"\u116E", "\u315D"=>"\u116F", "\u315E"=>"\u1170", "\u315F"=>"\u1171", "\u3160"=>"\u1172", "\u3161"=>"\u1173",
"\u3162"=>"\u1174", "\u3163"=>"\u1175", "\u3164"=>"\u1160", "\u3165"=>"\u1114", "\u3166"=>"\u1115", "\u3167"=>"\u11C7", "\u3168"=>"\u11C8", "\u3169"=>"\u11CC",
"\u316A"=>"\u11CE", "\u316B"=>"\u11D3", "\u316C"=>"\u11D7", "\u316D"=>"\u11D9", "\u316E"=>"\u111C", "\u316F"=>"\u11DD", "\u3170"=>"\u11DF", "\u3171"=>"\u111D",
"\u3172"=>"\u111E", "\u3173"=>"\u1120", "\u3174"=>"\u1122", "\u3175"=>"\u1123", "\u3176"=>"\u1127", "\u3177"=>"\u1129", "\u3178"=>"\u112B", "\u3179"=>"\u112C",
"\u317A"=>"\u112D", "\u317B"=>"\u112E", "\u317C"=>"\u112F", "\u317D"=>"\u1132", "\u317E"=>"\u1136", "\u317F"=>"\u1140", "\u3180"=>"\u1147", "\u3181"=>"\u114C",
"\u3182"=>"\u11F1", "\u3183"=>"\u11F2", "\u3184"=>"\u1157", "\u3185"=>"\u1158", "\u3186"=>"\u1159", "\u3187"=>"\u1184", "\u3188"=>"\u1185", "\u3189"=>"\u1188",
"\u318A"=>"\u1191", "\u318B"=>"\u1192", "\u318C"=>"\u1194", "\u318D"=>"\u119E", "\u318E"=>"\u11A1", "\u3192"=>"\u4E00", "\u3193"=>"\u4E8C", "\u3194"=>"\u4E09",
"\u3195"=>"\u56DB", "\u3196"=>"\u4E0A", "\u3197"=>"\u4E2D", "\u3198"=>"\u4E0B", "\u3199"=>"\u7532", "\u319A"=>"\u4E59", "\u319B"=>"\u4E19", "\u319C"=>"\u4E01",
"\u319D"=>"\u5929", "\u319E"=>"\u5730", "\u319F"=>"\u4EBA", "\u3200"=>"(\u1100)", "\u3201"=>"(\u1102)", "\u3202"=>"(\u1103)", "\u3203"=>"(\u1105)", "\u3204"=>"(\u1106)",
"\u3205"=>"(\u1107)", "\u3206"=>"(\u1109)", "\u3207"=>"(\u110B)", "\u3208"=>"(\u110C)", "\u3209"=>"(\u110E)", "\u320A"=>"(\u110F)", "\u320B"=>"(\u1110)", "\u320C"=>"(\u1111)",
"\u320D"=>"(\u1112)", "\u320E"=>"(\u1100\u1161)", "\u320F"=>"(\u1102\u1161)", "\u3210"=>"(\u1103\u1161)", "\u3211"=>"(\u1105\u1161)", "\u3212"=>"(\u1106\u1161)", "\u3213"=>"(\u1107\u1161)", "\u3214"=>"(\u1109\u1161)",
"\u3215"=>"(\u110B\u1161)", "\u3216"=>"(\u110C\u1161)", "\u3217"=>"(\u110E\u1161)", "\u3218"=>"(\u110F\u1161)", "\u3219"=>"(\u1110\u1161)", "\u321A"=>"(\u1111\u1161)", "\u321B"=>"(\u1112\u1161)", "\u321C"=>"(\u110C\u116E)",
"\u321D"=>"(\u110B\u1169\u110C\u1165\u11AB)", "\u321E"=>"(\u110B\u1169\u1112\u116E)", "\u3220"=>"(\u4E00)", "\u3221"=>"(\u4E8C)", "\u3222"=>"(\u4E09)", "\u3223"=>"(\u56DB)", "\u3224"=>"(\u4E94)", "\u3225"=>"(\u516D)",
"\u3226"=>"(\u4E03)", "\u3227"=>"(\u516B)", "\u3228"=>"(\u4E5D)", "\u3229"=>"(\u5341)", "\u322A"=>"(\u6708)", "\u322B"=>"(\u706B)", "\u322C"=>"(\u6C34)", "\u322D"=>"(\u6728)",
"\u322E"=>"(\u91D1)", "\u322F"=>"(\u571F)", "\u3230"=>"(\u65E5)", "\u3231"=>"(\u682A)", "\u3232"=>"(\u6709)", "\u3233"=>"(\u793E)", "\u3234"=>"(\u540D)", "\u3235"=>"(\u7279)",
"\u3236"=>"(\u8CA1)", "\u3237"=>"(\u795D)", "\u3238"=>"(\u52B4)", "\u3239"=>"(\u4EE3)", "\u323A"=>"(\u547C)", "\u323B"=>"(\u5B66)", "\u323C"=>"(\u76E3)", "\u323D"=>"(\u4F01)",
"\u323E"=>"(\u8CC7)", "\u323F"=>"(\u5354)", "\u3240"=>"(\u796D)", "\u3241"=>"(\u4F11)", "\u3242"=>"(\u81EA)", "\u3243"=>"(\u81F3)", "\u3244"=>"\u554F", "\u3245"=>"\u5E7C",
"\u3246"=>"\u6587", "\u3247"=>"\u7B8F", "\u3250"=>"PTE", "\u3251"=>"21", "\u3252"=>"22", "\u3253"=>"23", "\u3254"=>"24", "\u3255"=>"25",
"\u3256"=>"26", "\u3257"=>"27", "\u3258"=>"28", "\u3259"=>"29", "\u325A"=>"30", "\u325B"=>"31", "\u325C"=>"32", "\u325D"=>"33",
"\u325E"=>"34", "\u325F"=>"35", "\u3260"=>"\u1100", "\u3261"=>"\u1102", "\u3262"=>"\u1103", "\u3263"=>"\u1105", "\u3264"=>"\u1106", "\u3265"=>"\u1107",
"\u3266"=>"\u1109", "\u3267"=>"\u110B", "\u3268"=>"\u110C", "\u3269"=>"\u110E", "\u326A"=>"\u110F", "\u326B"=>"\u1110", "\u326C"=>"\u1111", "\u326D"=>"\u1112",
"\u326E"=>"\u1100\u1161", "\u326F"=>"\u1102\u1161", "\u3270"=>"\u1103\u1161", "\u3271"=>"\u1105\u1161", "\u3272"=>"\u1106\u1161", "\u3273"=>"\u1107\u1161", "\u3274"=>"\u1109\u1161", "\u3275"=>"\u110B\u1161",
"\u3276"=>"\u110C\u1161", "\u3277"=>"\u110E\u1161", "\u3278"=>"\u110F\u1161", "\u3279"=>"\u1110\u1161", "\u327A"=>"\u1111\u1161", "\u327B"=>"\u1112\u1161", "\u327C"=>"\u110E\u1161\u11B7\u1100\u1169", "\u327D"=>"\u110C\u116E\u110B\u1174",
"\u327E"=>"\u110B\u116E", "\u3280"=>"\u4E00", "\u3281"=>"\u4E8C", "\u3282"=>"\u4E09", "\u3283"=>"\u56DB", "\u3284"=>"\u4E94", "\u3285"=>"\u516D", "\u3286"=>"\u4E03",
"\u3287"=>"\u516B", "\u3288"=>"\u4E5D", "\u3289"=>"\u5341", "\u328A"=>"\u6708", "\u328B"=>"\u706B", "\u328C"=>"\u6C34", "\u328D"=>"\u6728", "\u328E"=>"\u91D1",
"\u328F"=>"\u571F", "\u3290"=>"\u65E5", "\u3291"=>"\u682A", "\u3292"=>"\u6709", "\u3293"=>"\u793E", "\u3294"=>"\u540D", "\u3295"=>"\u7279", "\u3296"=>"\u8CA1",
"\u3297"=>"\u795D", "\u3298"=>"\u52B4", "\u3299"=>"\u79D8", "\u329A"=>"\u7537", "\u329B"=>"\u5973", "\u329C"=>"\u9069", "\u329D"=>"\u512A", "\u329E"=>"\u5370",
"\u329F"=>"\u6CE8", "\u32A0"=>"\u9805", "\u32A1"=>"\u4F11", "\u32A2"=>"\u5199", "\u32A3"=>"\u6B63", "\u32A4"=>"\u4E0A", "\u32A5"=>"\u4E2D", "\u32A6"=>"\u4E0B",
"\u32A7"=>"\u5DE6", "\u32A8"=>"\u53F3", "\u32A9"=>"\u533B", "\u32AA"=>"\u5B97", "\u32AB"=>"\u5B66", "\u32AC"=>"\u76E3", "\u32AD"=>"\u4F01", "\u32AE"=>"\u8CC7",
"\u32AF"=>"\u5354", "\u32B0"=>"\u591C", "\u32B1"=>"36", "\u32B2"=>"37", "\u32B3"=>"38", "\u32B4"=>"39", "\u32B5"=>"40", "\u32B6"=>"41",
"\u32B7"=>"42", "\u32B8"=>"43", "\u32B9"=>"44", "\u32BA"=>"45", "\u32BB"=>"46", "\u32BC"=>"47", "\u32BD"=>"48", "\u32BE"=>"49",
"\u32BF"=>"50", "\u32C0"=>"1\u6708", "\u32C1"=>"2\u6708", "\u32C2"=>"3\u6708", "\u32C3"=>"4\u6708", "\u32C4"=>"5\u6708", "\u32C5"=>"6\u6708", "\u32C6"=>"7\u6708",
"\u32C7"=>"8\u6708", "\u32C8"=>"9\u6708", "\u32C9"=>"10\u6708", "\u32CA"=>"11\u6708", "\u32CB"=>"12\u6708", "\u32CC"=>"Hg", "\u32CD"=>"erg", "\u32CE"=>"eV",
"\u32CF"=>"LTD", "\u32D0"=>"\u30A2", "\u32D1"=>"\u30A4", "\u32D2"=>"\u30A6", "\u32D3"=>"\u30A8", "\u32D4"=>"\u30AA", "\u32D5"=>"\u30AB", "\u32D6"=>"\u30AD",
"\u32D7"=>"\u30AF", "\u32D8"=>"\u30B1", "\u32D9"=>"\u30B3", "\u32DA"=>"\u30B5", "\u32DB"=>"\u30B7", "\u32DC"=>"\u30B9", "\u32DD"=>"\u30BB", "\u32DE"=>"\u30BD",
"\u32DF"=>"\u30BF", "\u32E0"=>"\u30C1", "\u32E1"=>"\u30C4", "\u32E2"=>"\u30C6", "\u32E3"=>"\u30C8", "\u32E4"=>"\u30CA", "\u32E5"=>"\u30CB", "\u32E6"=>"\u30CC",
"\u32E7"=>"\u30CD", "\u32E8"=>"\u30CE", "\u32E9"=>"\u30CF", "\u32EA"=>"\u30D2", "\u32EB"=>"\u30D5", "\u32EC"=>"\u30D8", "\u32ED"=>"\u30DB", "\u32EE"=>"\u30DE",
"\u32EF"=>"\u30DF", "\u32F0"=>"\u30E0", "\u32F1"=>"\u30E1", "\u32F2"=>"\u30E2", "\u32F3"=>"\u30E4", "\u32F4"=>"\u30E6", "\u32F5"=>"\u30E8", "\u32F6"=>"\u30E9",
"\u32F7"=>"\u30EA", "\u32F8"=>"\u30EB", "\u32F9"=>"\u30EC", "\u32FA"=>"\u30ED", "\u32FB"=>"\u30EF", "\u32FC"=>"\u30F0", "\u32FD"=>"\u30F1", "\u32FE"=>"\u30F2",
"\u3300"=>"\u30A2\u30D1\u30FC\u30C8", "\u3301"=>"\u30A2\u30EB\u30D5\u30A1", "\u3302"=>"\u30A2\u30F3\u30DA\u30A2", "\u3303"=>"\u30A2\u30FC\u30EB", "\u3304"=>"\u30A4\u30CB\u30F3\u30B0", "\u3305"=>"\u30A4\u30F3\u30C1", "\u3306"=>"\u30A6\u30A9\u30F3", "\u3307"=>"\u30A8\u30B9\u30AF\u30FC\u30C9",
"\u3308"=>"\u30A8\u30FC\u30AB\u30FC", "\u3309"=>"\u30AA\u30F3\u30B9", "\u330A"=>"\u30AA\u30FC\u30E0", "\u330B"=>"\u30AB\u30A4\u30EA", "\u330C"=>"\u30AB\u30E9\u30C3\u30C8", "\u330D"=>"\u30AB\u30ED\u30EA\u30FC", "\u330E"=>"\u30AC\u30ED\u30F3", "\u330F"=>"\u30AC\u30F3\u30DE",
"\u3310"=>"\u30AE\u30AC", "\u3311"=>"\u30AE\u30CB\u30FC", "\u3312"=>"\u30AD\u30E5\u30EA\u30FC", "\u3313"=>"\u30AE\u30EB\u30C0\u30FC", "\u3314"=>"\u30AD\u30ED", "\u3315"=>"\u30AD\u30ED\u30B0\u30E9\u30E0", "\u3316"=>"\u30AD\u30ED\u30E1\u30FC\u30C8\u30EB", "\u3317"=>"\u30AD\u30ED\u30EF\u30C3\u30C8",
"\u3318"=>"\u30B0\u30E9\u30E0", "\u3319"=>"\u30B0\u30E9\u30E0\u30C8\u30F3", "\u331A"=>"\u30AF\u30EB\u30BC\u30A4\u30ED", "\u331B"=>"\u30AF\u30ED\u30FC\u30CD", "\u331C"=>"\u30B1\u30FC\u30B9", "\u331D"=>"\u30B3\u30EB\u30CA", "\u331E"=>"\u30B3\u30FC\u30DD", "\u331F"=>"\u30B5\u30A4\u30AF\u30EB",
"\u3320"=>"\u30B5\u30F3\u30C1\u30FC\u30E0", "\u3321"=>"\u30B7\u30EA\u30F3\u30B0", "\u3322"=>"\u30BB\u30F3\u30C1", "\u3323"=>"\u30BB\u30F3\u30C8", "\u3324"=>"\u30C0\u30FC\u30B9", "\u3325"=>"\u30C7\u30B7", "\u3326"=>"\u30C9\u30EB", "\u3327"=>"\u30C8\u30F3",
"\u3328"=>"\u30CA\u30CE", "\u3329"=>"\u30CE\u30C3\u30C8", "\u332A"=>"\u30CF\u30A4\u30C4", "\u332B"=>"\u30D1\u30FC\u30BB\u30F3\u30C8", "\u332C"=>"\u30D1\u30FC\u30C4", "\u332D"=>"\u30D0\u30FC\u30EC\u30EB", "\u332E"=>"\u30D4\u30A2\u30B9\u30C8\u30EB", "\u332F"=>"\u30D4\u30AF\u30EB",
"\u3330"=>"\u30D4\u30B3", "\u3331"=>"\u30D3\u30EB", "\u3332"=>"\u30D5\u30A1\u30E9\u30C3\u30C9", "\u3333"=>"\u30D5\u30A3\u30FC\u30C8", "\u3334"=>"\u30D6\u30C3\u30B7\u30A7\u30EB", "\u3335"=>"\u30D5\u30E9\u30F3", "\u3336"=>"\u30D8\u30AF\u30BF\u30FC\u30EB", "\u3337"=>"\u30DA\u30BD",
"\u3338"=>"\u30DA\u30CB\u30D2", "\u3339"=>"\u30D8\u30EB\u30C4", "\u333A"=>"\u30DA\u30F3\u30B9", "\u333B"=>"\u30DA\u30FC\u30B8", "\u333C"=>"\u30D9\u30FC\u30BF", "\u333D"=>"\u30DD\u30A4\u30F3\u30C8", "\u333E"=>"\u30DC\u30EB\u30C8", "\u333F"=>"\u30DB\u30F3",
"\u3340"=>"\u30DD\u30F3\u30C9", "\u3341"=>"\u30DB\u30FC\u30EB", "\u3342"=>"\u30DB\u30FC\u30F3", "\u3343"=>"\u30DE\u30A4\u30AF\u30ED", "\u3344"=>"\u30DE\u30A4\u30EB", "\u3345"=>"\u30DE\u30C3\u30CF", "\u3346"=>"\u30DE\u30EB\u30AF", "\u3347"=>"\u30DE\u30F3\u30B7\u30E7\u30F3",
"\u3348"=>"\u30DF\u30AF\u30ED\u30F3", "\u3349"=>"\u30DF\u30EA", "\u334A"=>"\u30DF\u30EA\u30D0\u30FC\u30EB", "\u334B"=>"\u30E1\u30AC", "\u334C"=>"\u30E1\u30AC\u30C8\u30F3", "\u334D"=>"\u30E1\u30FC\u30C8\u30EB", "\u334E"=>"\u30E4\u30FC\u30C9", "\u334F"=>"\u30E4\u30FC\u30EB",
"\u3350"=>"\u30E6\u30A2\u30F3", "\u3351"=>"\u30EA\u30C3\u30C8\u30EB", "\u3352"=>"\u30EA\u30E9", "\u3353"=>"\u30EB\u30D4\u30FC", "\u3354"=>"\u30EB\u30FC\u30D6\u30EB", "\u3355"=>"\u30EC\u30E0", "\u3356"=>"\u30EC\u30F3\u30C8\u30B2\u30F3", "\u3357"=>"\u30EF\u30C3\u30C8",
"\u3358"=>"0\u70B9", "\u3359"=>"1\u70B9", "\u335A"=>"2\u70B9", "\u335B"=>"3\u70B9", "\u335C"=>"4\u70B9", "\u335D"=>"5\u70B9", "\u335E"=>"6\u70B9", "\u335F"=>"7\u70B9",
"\u3360"=>"8\u70B9", "\u3361"=>"9\u70B9", "\u3362"=>"10\u70B9", "\u3363"=>"11\u70B9", "\u3364"=>"12\u70B9", "\u3365"=>"13\u70B9", "\u3366"=>"14\u70B9", "\u3367"=>"15\u70B9",
"\u3368"=>"16\u70B9", "\u3369"=>"17\u70B9", "\u336A"=>"18\u70B9", "\u336B"=>"19\u70B9", "\u336C"=>"20\u70B9", "\u336D"=>"21\u70B9", "\u336E"=>"22\u70B9", "\u336F"=>"23\u70B9",
"\u3370"=>"24\u70B9", "\u3371"=>"hPa", "\u3372"=>"da", "\u3373"=>"AU", "\u3374"=>"bar", "\u3375"=>"oV", "\u3376"=>"pc", "\u3377"=>"dm",
"\u3378"=>"dm2", "\u3379"=>"dm3", "\u337A"=>"IU", "\u337B"=>"\u5E73\u6210", "\u337C"=>"\u662D\u548C", "\u337D"=>"\u5927\u6B63", "\u337E"=>"\u660E\u6CBB", "\u337F"=>"\u682A\u5F0F\u4F1A\u793E",
"\u3380"=>"pA", "\u3381"=>"nA", "\u3382"=>"\u03BCA", "\u3383"=>"mA", "\u3384"=>"kA", "\u3385"=>"KB", "\u3386"=>"MB", "\u3387"=>"GB",
"\u3388"=>"cal", "\u3389"=>"kcal", "\u338A"=>"pF", "\u338B"=>"nF", "\u338C"=>"\u03BCF", "\u338D"=>"\u03BCg", "\u338E"=>"mg", "\u338F"=>"kg",
"\u3390"=>"Hz", "\u3391"=>"kHz", "\u3392"=>"MHz", "\u3393"=>"GHz", "\u3394"=>"THz", "\u3395"=>"\u03BCl", "\u3396"=>"ml", "\u3397"=>"dl",
"\u3398"=>"kl", "\u3399"=>"fm", "\u339A"=>"nm", "\u339B"=>"\u03BCm", "\u339C"=>"mm", "\u339D"=>"cm", "\u339E"=>"km", "\u339F"=>"mm2",
"\u33A0"=>"cm2", "\u33A1"=>"m2", "\u33A2"=>"km2", "\u33A3"=>"mm3", "\u33A4"=>"cm3", "\u33A5"=>"m3", "\u33A6"=>"km3", "\u33A7"=>"m\u2215s",
"\u33A8"=>"m\u2215s2", "\u33A9"=>"Pa", "\u33AA"=>"kPa", "\u33AB"=>"MPa", "\u33AC"=>"GPa", "\u33AD"=>"rad", "\u33AE"=>"rad\u2215s", "\u33AF"=>"rad\u2215s2",
"\u33B0"=>"ps", "\u33B1"=>"ns", "\u33B2"=>"\u03BCs", "\u33B3"=>"ms", "\u33B4"=>"pV", "\u33B5"=>"nV", "\u33B6"=>"\u03BCV", "\u33B7"=>"mV",
"\u33B8"=>"kV", "\u33B9"=>"MV", "\u33BA"=>"pW", "\u33BB"=>"nW", "\u33BC"=>"\u03BCW", "\u33BD"=>"mW", "\u33BE"=>"kW", "\u33BF"=>"MW",
"\u33C0"=>"k\u03A9", "\u33C1"=>"M\u03A9", "\u33C2"=>"a.m.", "\u33C3"=>"Bq", "\u33C4"=>"cc", "\u33C5"=>"cd", "\u33C6"=>"C\u2215kg", "\u33C7"=>"Co.",
"\u33C8"=>"dB", "\u33C9"=>"Gy", "\u33CA"=>"ha", "\u33CB"=>"HP", "\u33CC"=>"in", "\u33CD"=>"KK", "\u33CE"=>"KM", "\u33CF"=>"kt",
"\u33D0"=>"lm", "\u33D1"=>"ln", "\u33D2"=>"log", "\u33D3"=>"lx", "\u33D4"=>"mb", "\u33D5"=>"mil", "\u33D6"=>"mol", "\u33D7"=>"PH",
"\u33D8"=>"p.m.", "\u33D9"=>"PPM", "\u33DA"=>"PR", "\u33DB"=>"sr", "\u33DC"=>"Sv", "\u33DD"=>"Wb", "\u33DE"=>"V\u2215m", "\u33DF"=>"A\u2215m",
"\u33E0"=>"1\u65E5", "\u33E1"=>"2\u65E5", "\u33E2"=>"3\u65E5", "\u33E3"=>"4\u65E5", "\u33E4"=>"5\u65E5", "\u33E5"=>"6\u65E5", "\u33E6"=>"7\u65E5", "\u33E7"=>"8\u65E5",
"\u33E8"=>"9\u65E5", "\u33E9"=>"10\u65E5", "\u33EA"=>"11\u65E5", "\u33EB"=>"12\u65E5", "\u33EC"=>"13\u65E5", "\u33ED"=>"14\u65E5", "\u33EE"=>"15\u65E5", "\u33EF"=>"16\u65E5",
"\u33F0"=>"17\u65E5", "\u33F1"=>"18\u65E5", "\u33F2"=>"19\u65E5", "\u33F3"=>"20\u65E5", "\u33F4"=>"21\u65E5", "\u33F5"=>"22\u65E5", "\u33F6"=>"23\u65E5", "\u33F7"=>"24\u65E5",
"\u33F8"=>"25\u65E5", "\u33F9"=>"26\u65E5", "\u33FA"=>"27\u65E5", "\u33FB"=>"28\u65E5", "\u33FC"=>"29\u65E5", "\u33FD"=>"30\u65E5", "\u33FE"=>"31\u65E5", "\u33FF"=>"gal",
"\uA69C"=>"\u044A", "\uA69D"=>"\u044C", "\uA770"=>"\uA76F", "\uA7F8"=>"\u0126", "\uA7F9"=>"\u0153", "\uAB5C"=>"\uA727", "\uAB5D"=>"\uAB37", "\uAB5E"=>"\u026B",
"\uAB5F"=>"\uAB52", "\uFB00"=>"ff", "\uFB01"=>"fi", "\uFB02"=>"fl", "\uFB03"=>"ffi", "\uFB04"=>"ffl", "\uFB05"=>"st", "\uFB06"=>"st",
"\uFB13"=>"\u0574\u0576", "\uFB14"=>"\u0574\u0565", "\uFB15"=>"\u0574\u056B", "\uFB16"=>"\u057E\u0576", "\uFB17"=>"\u0574\u056D", "\uFB20"=>"\u05E2", "\uFB21"=>"\u05D0", "\uFB22"=>"\u05D3",
"\uFB23"=>"\u05D4", "\uFB24"=>"\u05DB", "\uFB25"=>"\u05DC", "\uFB26"=>"\u05DD", "\uFB27"=>"\u05E8", "\uFB28"=>"\u05EA", "\uFB29"=>"+", "\uFB4F"=>"\u05D0\u05DC",
"\uFB50"=>"\u0671", "\uFB51"=>"\u0671", "\uFB52"=>"\u067B", "\uFB53"=>"\u067B", "\uFB54"=>"\u067B", "\uFB55"=>"\u067B", "\uFB56"=>"\u067E", "\uFB57"=>"\u067E",
"\uFB58"=>"\u067E", "\uFB59"=>"\u067E", "\uFB5A"=>"\u0680", "\uFB5B"=>"\u0680", "\uFB5C"=>"\u0680", "\uFB5D"=>"\u0680", "\uFB5E"=>"\u067A", "\uFB5F"=>"\u067A",
"\uFB60"=>"\u067A", "\uFB61"=>"\u067A", "\uFB62"=>"\u067F", "\uFB63"=>"\u067F", "\uFB64"=>"\u067F", "\uFB65"=>"\u067F", "\uFB66"=>"\u0679", "\uFB67"=>"\u0679",
"\uFB68"=>"\u0679", "\uFB69"=>"\u0679", "\uFB6A"=>"\u06A4", "\uFB6B"=>"\u06A4", "\uFB6C"=>"\u06A4", "\uFB6D"=>"\u06A4", "\uFB6E"=>"\u06A6", "\uFB6F"=>"\u06A6",
"\uFB70"=>"\u06A6", "\uFB71"=>"\u06A6", "\uFB72"=>"\u0684", "\uFB73"=>"\u0684", "\uFB74"=>"\u0684", "\uFB75"=>"\u0684", "\uFB76"=>"\u0683", "\uFB77"=>"\u0683",
"\uFB78"=>"\u0683", "\uFB79"=>"\u0683", "\uFB7A"=>"\u0686", "\uFB7B"=>"\u0686", "\uFB7C"=>"\u0686", "\uFB7D"=>"\u0686", "\uFB7E"=>"\u0687", "\uFB7F"=>"\u0687",
"\uFB80"=>"\u0687", "\uFB81"=>"\u0687", "\uFB82"=>"\u068D", "\uFB83"=>"\u068D", "\uFB84"=>"\u068C", "\uFB85"=>"\u068C", "\uFB86"=>"\u068E", "\uFB87"=>"\u068E",
"\uFB88"=>"\u0688", "\uFB89"=>"\u0688", "\uFB8A"=>"\u0698", "\uFB8B"=>"\u0698", "\uFB8C"=>"\u0691", "\uFB8D"=>"\u0691", "\uFB8E"=>"\u06A9", "\uFB8F"=>"\u06A9",
"\uFB90"=>"\u06A9", "\uFB91"=>"\u06A9", "\uFB92"=>"\u06AF", "\uFB93"=>"\u06AF", "\uFB94"=>"\u06AF", "\uFB95"=>"\u06AF", "\uFB96"=>"\u06B3", "\uFB97"=>"\u06B3",
"\uFB98"=>"\u06B3", "\uFB99"=>"\u06B3", "\uFB9A"=>"\u06B1", "\uFB9B"=>"\u06B1", "\uFB9C"=>"\u06B1", "\uFB9D"=>"\u06B1", "\uFB9E"=>"\u06BA", "\uFB9F"=>"\u06BA",
"\uFBA0"=>"\u06BB", "\uFBA1"=>"\u06BB", "\uFBA2"=>"\u06BB", "\uFBA3"=>"\u06BB", "\uFBA4"=>"\u06C0", "\uFBA5"=>"\u06C0", "\uFBA6"=>"\u06C1", "\uFBA7"=>"\u06C1",
"\uFBA8"=>"\u06C1", "\uFBA9"=>"\u06C1", "\uFBAA"=>"\u06BE", "\uFBAB"=>"\u06BE", "\uFBAC"=>"\u06BE", "\uFBAD"=>"\u06BE", "\uFBAE"=>"\u06D2", "\uFBAF"=>"\u06D2",
"\uFBB0"=>"\u06D3", "\uFBB1"=>"\u06D3", "\uFBD3"=>"\u06AD", "\uFBD4"=>"\u06AD", "\uFBD5"=>"\u06AD", "\uFBD6"=>"\u06AD", "\uFBD7"=>"\u06C7", "\uFBD8"=>"\u06C7",
"\uFBD9"=>"\u06C6", "\uFBDA"=>"\u06C6", "\uFBDB"=>"\u06C8", "\uFBDC"=>"\u06C8", "\uFBDD"=>"\u06C7\u0674", "\uFBDE"=>"\u06CB", "\uFBDF"=>"\u06CB", "\uFBE0"=>"\u06C5",
"\uFBE1"=>"\u06C5", "\uFBE2"=>"\u06C9", "\uFBE3"=>"\u06C9", "\uFBE4"=>"\u06D0", "\uFBE5"=>"\u06D0", "\uFBE6"=>"\u06D0", "\uFBE7"=>"\u06D0", "\uFBE8"=>"\u0649",
"\uFBE9"=>"\u0649", "\uFBEA"=>"\u0626\u0627", "\uFBEB"=>"\u0626\u0627", "\uFBEC"=>"\u0626\u06D5", "\uFBED"=>"\u0626\u06D5", "\uFBEE"=>"\u0626\u0648", "\uFBEF"=>"\u0626\u0648", "\uFBF0"=>"\u0626\u06C7",
"\uFBF1"=>"\u0626\u06C7", "\uFBF2"=>"\u0626\u06C6", "\uFBF3"=>"\u0626\u06C6", "\uFBF4"=>"\u0626\u06C8", "\uFBF5"=>"\u0626\u06C8", "\uFBF6"=>"\u0626\u06D0", "\uFBF7"=>"\u0626\u06D0", "\uFBF8"=>"\u0626\u06D0",
"\uFBF9"=>"\u0626\u0649", "\uFBFA"=>"\u0626\u0649", "\uFBFB"=>"\u0626\u0649", "\uFBFC"=>"\u06CC", "\uFBFD"=>"\u06CC", "\uFBFE"=>"\u06CC", "\uFBFF"=>"\u06CC", "\uFC00"=>"\u0626\u062C",
"\uFC01"=>"\u0626\u062D", "\uFC02"=>"\u0626\u0645", "\uFC03"=>"\u0626\u0649", "\uFC04"=>"\u0626\u064A", "\uFC05"=>"\u0628\u062C", "\uFC06"=>"\u0628\u062D", "\uFC07"=>"\u0628\u062E", "\uFC08"=>"\u0628\u0645",
"\uFC09"=>"\u0628\u0649", "\uFC0A"=>"\u0628\u064A", "\uFC0B"=>"\u062A\u062C", "\uFC0C"=>"\u062A\u062D", "\uFC0D"=>"\u062A\u062E", "\uFC0E"=>"\u062A\u0645", "\uFC0F"=>"\u062A\u0649", "\uFC10"=>"\u062A\u064A",
"\uFC11"=>"\u062B\u062C", "\uFC12"=>"\u062B\u0645", "\uFC13"=>"\u062B\u0649", "\uFC14"=>"\u062B\u064A", "\uFC15"=>"\u062C\u062D", "\uFC16"=>"\u062C\u0645", "\uFC17"=>"\u062D\u062C", "\uFC18"=>"\u062D\u0645",
"\uFC19"=>"\u062E\u062C", "\uFC1A"=>"\u062E\u062D", "\uFC1B"=>"\u062E\u0645", "\uFC1C"=>"\u0633\u062C", "\uFC1D"=>"\u0633\u062D", "\uFC1E"=>"\u0633\u062E", "\uFC1F"=>"\u0633\u0645", "\uFC20"=>"\u0635\u062D",
"\uFC21"=>"\u0635\u0645", "\uFC22"=>"\u0636\u062C", "\uFC23"=>"\u0636\u062D", "\uFC24"=>"\u0636\u062E", "\uFC25"=>"\u0636\u0645", "\uFC26"=>"\u0637\u062D", "\uFC27"=>"\u0637\u0645", "\uFC28"=>"\u0638\u0645",
"\uFC29"=>"\u0639\u062C", "\uFC2A"=>"\u0639\u0645", "\uFC2B"=>"\u063A\u062C", "\uFC2C"=>"\u063A\u0645", "\uFC2D"=>"\u0641\u062C", "\uFC2E"=>"\u0641\u062D", "\uFC2F"=>"\u0641\u062E", "\uFC30"=>"\u0641\u0645",
"\uFC31"=>"\u0641\u0649", "\uFC32"=>"\u0641\u064A", "\uFC33"=>"\u0642\u062D", "\uFC34"=>"\u0642\u0645", "\uFC35"=>"\u0642\u0649", "\uFC36"=>"\u0642\u064A", "\uFC37"=>"\u0643\u0627", "\uFC38"=>"\u0643\u062C",
"\uFC39"=>"\u0643\u062D", "\uFC3A"=>"\u0643\u062E", "\uFC3B"=>"\u0643\u0644", "\uFC3C"=>"\u0643\u0645", "\uFC3D"=>"\u0643\u0649", "\uFC3E"=>"\u0643\u064A", "\uFC3F"=>"\u0644\u062C", "\uFC40"=>"\u0644\u062D",
"\uFC41"=>"\u0644\u062E", "\uFC42"=>"\u0644\u0645", "\uFC43"=>"\u0644\u0649", "\uFC44"=>"\u0644\u064A", "\uFC45"=>"\u0645\u062C", "\uFC46"=>"\u0645\u062D", "\uFC47"=>"\u0645\u062E", "\uFC48"=>"\u0645\u0645",
"\uFC49"=>"\u0645\u0649", "\uFC4A"=>"\u0645\u064A", "\uFC4B"=>"\u0646\u062C", "\uFC4C"=>"\u0646\u062D", "\uFC4D"=>"\u0646\u062E", "\uFC4E"=>"\u0646\u0645", "\uFC4F"=>"\u0646\u0649", "\uFC50"=>"\u0646\u064A",
"\uFC51"=>"\u0647\u062C", "\uFC52"=>"\u0647\u0645", "\uFC53"=>"\u0647\u0649", "\uFC54"=>"\u0647\u064A", "\uFC55"=>"\u064A\u062C", "\uFC56"=>"\u064A\u062D", "\uFC57"=>"\u064A\u062E", "\uFC58"=>"\u064A\u0645",
"\uFC59"=>"\u064A\u0649", "\uFC5A"=>"\u064A\u064A", "\uFC5B"=>"\u0630\u0670", "\uFC5C"=>"\u0631\u0670", "\uFC5D"=>"\u0649\u0670", "\uFC5E"=>" \u064C\u0651", "\uFC5F"=>" \u064D\u0651", "\uFC60"=>" \u064E\u0651",
"\uFC61"=>" \u064F\u0651", "\uFC62"=>" \u0650\u0651", "\uFC63"=>" \u0651\u0670", "\uFC64"=>"\u0626\u0631", "\uFC65"=>"\u0626\u0632", "\uFC66"=>"\u0626\u0645", "\uFC67"=>"\u0626\u0646", "\uFC68"=>"\u0626\u0649",
"\uFC69"=>"\u0626\u064A", "\uFC6A"=>"\u0628\u0631", "\uFC6B"=>"\u0628\u0632", "\uFC6C"=>"\u0628\u0645", "\uFC6D"=>"\u0628\u0646", "\uFC6E"=>"\u0628\u0649", "\uFC6F"=>"\u0628\u064A", "\uFC70"=>"\u062A\u0631",
"\uFC71"=>"\u062A\u0632", "\uFC72"=>"\u062A\u0645", "\uFC73"=>"\u062A\u0646", "\uFC74"=>"\u062A\u0649", "\uFC75"=>"\u062A\u064A", "\uFC76"=>"\u062B\u0631", "\uFC77"=>"\u062B\u0632", "\uFC78"=>"\u062B\u0645",
"\uFC79"=>"\u062B\u0646", "\uFC7A"=>"\u062B\u0649", "\uFC7B"=>"\u062B\u064A", "\uFC7C"=>"\u0641\u0649", "\uFC7D"=>"\u0641\u064A", "\uFC7E"=>"\u0642\u0649", "\uFC7F"=>"\u0642\u064A", "\uFC80"=>"\u0643\u0627",
"\uFC81"=>"\u0643\u0644", "\uFC82"=>"\u0643\u0645", "\uFC83"=>"\u0643\u0649", "\uFC84"=>"\u0643\u064A", "\uFC85"=>"\u0644\u0645", "\uFC86"=>"\u0644\u0649", "\uFC87"=>"\u0644\u064A", "\uFC88"=>"\u0645\u0627",
"\uFC89"=>"\u0645\u0645", "\uFC8A"=>"\u0646\u0631", "\uFC8B"=>"\u0646\u0632", "\uFC8C"=>"\u0646\u0645", "\uFC8D"=>"\u0646\u0646", "\uFC8E"=>"\u0646\u0649", "\uFC8F"=>"\u0646\u064A", "\uFC90"=>"\u0649\u0670",
"\uFC91"=>"\u064A\u0631", "\uFC92"=>"\u064A\u0632", "\uFC93"=>"\u064A\u0645", "\uFC94"=>"\u064A\u0646", "\uFC95"=>"\u064A\u0649", "\uFC96"=>"\u064A\u064A", "\uFC97"=>"\u0626\u062C", "\uFC98"=>"\u0626\u062D",
"\uFC99"=>"\u0626\u062E", "\uFC9A"=>"\u0626\u0645", "\uFC9B"=>"\u0626\u0647", "\uFC9C"=>"\u0628\u062C", "\uFC9D"=>"\u0628\u062D", "\uFC9E"=>"\u0628\u062E", "\uFC9F"=>"\u0628\u0645", "\uFCA0"=>"\u0628\u0647",
"\uFCA1"=>"\u062A\u062C", "\uFCA2"=>"\u062A\u062D", "\uFCA3"=>"\u062A\u062E", "\uFCA4"=>"\u062A\u0645", "\uFCA5"=>"\u062A\u0647", "\uFCA6"=>"\u062B\u0645", "\uFCA7"=>"\u062C\u062D", "\uFCA8"=>"\u062C\u0645",
"\uFCA9"=>"\u062D\u062C", "\uFCAA"=>"\u062D\u0645", "\uFCAB"=>"\u062E\u062C", "\uFCAC"=>"\u062E\u0645", "\uFCAD"=>"\u0633\u062C", "\uFCAE"=>"\u0633\u062D", "\uFCAF"=>"\u0633\u062E", "\uFCB0"=>"\u0633\u0645",
"\uFCB1"=>"\u0635\u062D", "\uFCB2"=>"\u0635\u062E", "\uFCB3"=>"\u0635\u0645", "\uFCB4"=>"\u0636\u062C", "\uFCB5"=>"\u0636\u062D", "\uFCB6"=>"\u0636\u062E", "\uFCB7"=>"\u0636\u0645", "\uFCB8"=>"\u0637\u062D",
"\uFCB9"=>"\u0638\u0645", "\uFCBA"=>"\u0639\u062C", "\uFCBB"=>"\u0639\u0645", "\uFCBC"=>"\u063A\u062C", "\uFCBD"=>"\u063A\u0645", "\uFCBE"=>"\u0641\u062C", "\uFCBF"=>"\u0641\u062D", "\uFCC0"=>"\u0641\u062E",
"\uFCC1"=>"\u0641\u0645", "\uFCC2"=>"\u0642\u062D", "\uFCC3"=>"\u0642\u0645", "\uFCC4"=>"\u0643\u062C", "\uFCC5"=>"\u0643\u062D", "\uFCC6"=>"\u0643\u062E", "\uFCC7"=>"\u0643\u0644", "\uFCC8"=>"\u0643\u0645",
"\uFCC9"=>"\u0644\u062C", "\uFCCA"=>"\u0644\u062D", "\uFCCB"=>"\u0644\u062E", "\uFCCC"=>"\u0644\u0645", "\uFCCD"=>"\u0644\u0647", "\uFCCE"=>"\u0645\u062C", "\uFCCF"=>"\u0645\u062D", "\uFCD0"=>"\u0645\u062E",
"\uFCD1"=>"\u0645\u0645", "\uFCD2"=>"\u0646\u062C", "\uFCD3"=>"\u0646\u062D", "\uFCD4"=>"\u0646\u062E", "\uFCD5"=>"\u0646\u0645", "\uFCD6"=>"\u0646\u0647", "\uFCD7"=>"\u0647\u062C", "\uFCD8"=>"\u0647\u0645",
"\uFCD9"=>"\u0647\u0670", "\uFCDA"=>"\u064A\u062C", "\uFCDB"=>"\u064A\u062D", "\uFCDC"=>"\u064A\u062E", "\uFCDD"=>"\u064A\u0645", "\uFCDE"=>"\u064A\u0647", "\uFCDF"=>"\u0626\u0645", "\uFCE0"=>"\u0626\u0647",
"\uFCE1"=>"\u0628\u0645", "\uFCE2"=>"\u0628\u0647", "\uFCE3"=>"\u062A\u0645", "\uFCE4"=>"\u062A\u0647", "\uFCE5"=>"\u062B\u0645", "\uFCE6"=>"\u062B\u0647", "\uFCE7"=>"\u0633\u0645", "\uFCE8"=>"\u0633\u0647",
"\uFCE9"=>"\u0634\u0645", "\uFCEA"=>"\u0634\u0647", "\uFCEB"=>"\u0643\u0644", "\uFCEC"=>"\u0643\u0645", "\uFCED"=>"\u0644\u0645", "\uFCEE"=>"\u0646\u0645", "\uFCEF"=>"\u0646\u0647", "\uFCF0"=>"\u064A\u0645",
"\uFCF1"=>"\u064A\u0647", "\uFCF2"=>"\u0640\u064E\u0651", "\uFCF3"=>"\u0640\u064F\u0651", "\uFCF4"=>"\u0640\u0650\u0651", "\uFCF5"=>"\u0637\u0649", "\uFCF6"=>"\u0637\u064A", "\uFCF7"=>"\u0639\u0649", "\uFCF8"=>"\u0639\u064A",
"\uFCF9"=>"\u063A\u0649", "\uFCFA"=>"\u063A\u064A", "\uFCFB"=>"\u0633\u0649", "\uFCFC"=>"\u0633\u064A", "\uFCFD"=>"\u0634\u0649", "\uFCFE"=>"\u0634\u064A", "\uFCFF"=>"\u062D\u0649", "\uFD00"=>"\u062D\u064A",
"\uFD01"=>"\u062C\u0649", "\uFD02"=>"\u062C\u064A", "\uFD03"=>"\u062E\u0649", "\uFD04"=>"\u062E\u064A", "\uFD05"=>"\u0635\u0649", "\uFD06"=>"\u0635\u064A", "\uFD07"=>"\u0636\u0649", "\uFD08"=>"\u0636\u064A",
"\uFD09"=>"\u0634\u062C", "\uFD0A"=>"\u0634\u062D", "\uFD0B"=>"\u0634\u062E", "\uFD0C"=>"\u0634\u0645", "\uFD0D"=>"\u0634\u0631", "\uFD0E"=>"\u0633\u0631", "\uFD0F"=>"\u0635\u0631", "\uFD10"=>"\u0636\u0631",
"\uFD11"=>"\u0637\u0649", "\uFD12"=>"\u0637\u064A", "\uFD13"=>"\u0639\u0649", "\uFD14"=>"\u0639\u064A", "\uFD15"=>"\u063A\u0649", "\uFD16"=>"\u063A\u064A", "\uFD17"=>"\u0633\u0649", "\uFD18"=>"\u0633\u064A",
"\uFD19"=>"\u0634\u0649", "\uFD1A"=>"\u0634\u064A", "\uFD1B"=>"\u062D\u0649", "\uFD1C"=>"\u062D\u064A", "\uFD1D"=>"\u062C\u0649", "\uFD1E"=>"\u062C\u064A", "\uFD1F"=>"\u062E\u0649", "\uFD20"=>"\u062E\u064A",
"\uFD21"=>"\u0635\u0649", "\uFD22"=>"\u0635\u064A", "\uFD23"=>"\u0636\u0649", "\uFD24"=>"\u0636\u064A", "\uFD25"=>"\u0634\u062C", "\uFD26"=>"\u0634\u062D", "\uFD27"=>"\u0634\u062E", "\uFD28"=>"\u0634\u0645",
"\uFD29"=>"\u0634\u0631", "\uFD2A"=>"\u0633\u0631", "\uFD2B"=>"\u0635\u0631", "\uFD2C"=>"\u0636\u0631", "\uFD2D"=>"\u0634\u062C", "\uFD2E"=>"\u0634\u062D", "\uFD2F"=>"\u0634\u062E", "\uFD30"=>"\u0634\u0645",
"\uFD31"=>"\u0633\u0647", "\uFD32"=>"\u0634\u0647", "\uFD33"=>"\u0637\u0645", "\uFD34"=>"\u0633\u062C", "\uFD35"=>"\u0633\u062D", "\uFD36"=>"\u0633\u062E", "\uFD37"=>"\u0634\u062C", "\uFD38"=>"\u0634\u062D",
"\uFD39"=>"\u0634\u062E", "\uFD3A"=>"\u0637\u0645", "\uFD3B"=>"\u0638\u0645", "\uFD3C"=>"\u0627\u064B", "\uFD3D"=>"\u0627\u064B", "\uFD50"=>"\u062A\u062C\u0645", "\uFD51"=>"\u062A\u062D\u062C", "\uFD52"=>"\u062A\u062D\u062C",
"\uFD53"=>"\u062A\u062D\u0645", "\uFD54"=>"\u062A\u062E\u0645", "\uFD55"=>"\u062A\u0645\u062C", "\uFD56"=>"\u062A\u0645\u062D", "\uFD57"=>"\u062A\u0645\u062E", "\uFD58"=>"\u062C\u0645\u062D", "\uFD59"=>"\u062C\u0645\u062D", "\uFD5A"=>"\u062D\u0645\u064A",
"\uFD5B"=>"\u062D\u0645\u0649", "\uFD5C"=>"\u0633\u062D\u062C", "\uFD5D"=>"\u0633\u062C\u062D", "\uFD5E"=>"\u0633\u062C\u0649", "\uFD5F"=>"\u0633\u0645\u062D", "\uFD60"=>"\u0633\u0645\u062D", "\uFD61"=>"\u0633\u0645\u062C", "\uFD62"=>"\u0633\u0645\u0645",
"\uFD63"=>"\u0633\u0645\u0645", "\uFD64"=>"\u0635\u062D\u062D", "\uFD65"=>"\u0635\u062D\u062D", "\uFD66"=>"\u0635\u0645\u0645", "\uFD67"=>"\u0634\u062D\u0645", "\uFD68"=>"\u0634\u062D\u0645", "\uFD69"=>"\u0634\u062C\u064A", "\uFD6A"=>"\u0634\u0645\u062E",
"\uFD6B"=>"\u0634\u0645\u062E", "\uFD6C"=>"\u0634\u0645\u0645", "\uFD6D"=>"\u0634\u0645\u0645", "\uFD6E"=>"\u0636\u062D\u0649", "\uFD6F"=>"\u0636\u062E\u0645", "\uFD70"=>"\u0636\u062E\u0645", "\uFD71"=>"\u0637\u0645\u062D", "\uFD72"=>"\u0637\u0645\u062D",
"\uFD73"=>"\u0637\u0645\u0645", "\uFD74"=>"\u0637\u0645\u064A", "\uFD75"=>"\u0639\u062C\u0645", "\uFD76"=>"\u0639\u0645\u0645", "\uFD77"=>"\u0639\u0645\u0645", "\uFD78"=>"\u0639\u0645\u0649", "\uFD79"=>"\u063A\u0645\u0645", "\uFD7A"=>"\u063A\u0645\u064A",
"\uFD7B"=>"\u063A\u0645\u0649", "\uFD7C"=>"\u0641\u062E\u0645", "\uFD7D"=>"\u0641\u062E\u0645", "\uFD7E"=>"\u0642\u0645\u062D", "\uFD7F"=>"\u0642\u0645\u0645", "\uFD80"=>"\u0644\u062D\u0645", "\uFD81"=>"\u0644\u062D\u064A", "\uFD82"=>"\u0644\u062D\u0649",
"\uFD83"=>"\u0644\u062C\u062C", "\uFD84"=>"\u0644\u062C\u062C", "\uFD85"=>"\u0644\u062E\u0645", "\uFD86"=>"\u0644\u062E\u0645", "\uFD87"=>"\u0644\u0645\u062D", "\uFD88"=>"\u0644\u0645\u062D", "\uFD89"=>"\u0645\u062D\u062C", "\uFD8A"=>"\u0645\u062D\u0645",
"\uFD8B"=>"\u0645\u062D\u064A", "\uFD8C"=>"\u0645\u062C\u062D", "\uFD8D"=>"\u0645\u062C\u0645", "\uFD8E"=>"\u0645\u062E\u062C", "\uFD8F"=>"\u0645\u062E\u0645", "\uFD92"=>"\u0645\u062C\u062E", "\uFD93"=>"\u0647\u0645\u062C", "\uFD94"=>"\u0647\u0645\u0645",
"\uFD95"=>"\u0646\u062D\u0645", "\uFD96"=>"\u0646\u062D\u0649", "\uFD97"=>"\u0646\u062C\u0645", "\uFD98"=>"\u0646\u062C\u0645", "\uFD99"=>"\u0646\u062C\u0649", "\uFD9A"=>"\u0646\u0645\u064A", "\uFD9B"=>"\u0646\u0645\u0649", "\uFD9C"=>"\u064A\u0645\u0645",
"\uFD9D"=>"\u064A\u0645\u0645", "\uFD9E"=>"\u0628\u062E\u064A", "\uFD9F"=>"\u062A\u062C\u064A", "\uFDA0"=>"\u062A\u062C\u0649", "\uFDA1"=>"\u062A\u062E\u064A", "\uFDA2"=>"\u062A\u062E\u0649", "\uFDA3"=>"\u062A\u0645\u064A", "\uFDA4"=>"\u062A\u0645\u0649",
"\uFDA5"=>"\u062C\u0645\u064A", "\uFDA6"=>"\u062C\u062D\u0649", "\uFDA7"=>"\u062C\u0645\u0649", "\uFDA8"=>"\u0633\u062E\u0649", "\uFDA9"=>"\u0635\u062D\u064A", "\uFDAA"=>"\u0634\u062D\u064A", "\uFDAB"=>"\u0636\u062D\u064A", "\uFDAC"=>"\u0644\u062C\u064A",
"\uFDAD"=>"\u0644\u0645\u064A", "\uFDAE"=>"\u064A\u062D\u064A", "\uFDAF"=>"\u064A\u062C\u064A", "\uFDB0"=>"\u064A\u0645\u064A", "\uFDB1"=>"\u0645\u0645\u064A", "\uFDB2"=>"\u0642\u0645\u064A", "\uFDB3"=>"\u0646\u062D\u064A", "\uFDB4"=>"\u0642\u0645\u062D",
"\uFDB5"=>"\u0644\u062D\u0645", "\uFDB6"=>"\u0639\u0645\u064A", "\uFDB7"=>"\u0643\u0645\u064A", "\uFDB8"=>"\u0646\u062C\u062D", "\uFDB9"=>"\u0645\u062E\u064A", "\uFDBA"=>"\u0644\u062C\u0645", "\uFDBB"=>"\u0643\u0645\u0645", "\uFDBC"=>"\u0644\u062C\u0645",
"\uFDBD"=>"\u0646\u062C\u062D", "\uFDBE"=>"\u062C\u062D\u064A", "\uFDBF"=>"\u062D\u062C\u064A", "\uFDC0"=>"\u0645\u062C\u064A", "\uFDC1"=>"\u0641\u0645\u064A", "\uFDC2"=>"\u0628\u062D\u064A", "\uFDC3"=>"\u0643\u0645\u0645", "\uFDC4"=>"\u0639\u062C\u0645",
"\uFDC5"=>"\u0635\u0645\u0645", "\uFDC6"=>"\u0633\u062E\u064A", "\uFDC7"=>"\u0646\u062C\u064A", "\uFDF0"=>"\u0635\u0644\u06D2", "\uFDF1"=>"\u0642\u0644\u06D2", "\uFDF2"=>"\u0627\u0644\u0644\u0647", "\uFDF3"=>"\u0627\u0643\u0628\u0631", "\uFDF4"=>"\u0645\u062D\u0645\u062F",
"\uFDF5"=>"\u0635\u0644\u0639\u0645", "\uFDF6"=>"\u0631\u0633\u0648\u0644", "\uFDF7"=>"\u0639\u0644\u064A\u0647", "\uFDF8"=>"\u0648\u0633\u0644\u0645", "\uFDF9"=>"\u0635\u0644\u0649", "\uFDFA"=>"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064A\u0647 \u0648\u0633\u0644\u0645", "\uFDFB"=>"\u062C\u0644 \u062C\u0644\u0627\u0644\u0647", "\uFDFC"=>"\u0631\u06CC\u0627\u0644",
"\uFE10"=>",", "\uFE11"=>"\u3001", "\uFE12"=>"\u3002", "\uFE13"=>":", "\uFE14"=>";", "\uFE15"=>"!", "\uFE16"=>"?", "\uFE17"=>"\u3016",
"\uFE18"=>"\u3017", "\uFE19"=>"...", "\uFE30"=>"..", "\uFE31"=>"\u2014", "\uFE32"=>"\u2013", "\uFE33"=>"_", "\uFE34"=>"_", "\uFE35"=>"(",
"\uFE36"=>")", "\uFE37"=>"{", "\uFE38"=>"}", "\uFE39"=>"\u3014", "\uFE3A"=>"\u3015", "\uFE3B"=>"\u3010", "\uFE3C"=>"\u3011", "\uFE3D"=>"\u300A",
"\uFE3E"=>"\u300B", "\uFE3F"=>"\u3008", "\uFE40"=>"\u3009", "\uFE41"=>"\u300C", "\uFE42"=>"\u300D", "\uFE43"=>"\u300E", "\uFE44"=>"\u300F", "\uFE47"=>"[",
"\uFE48"=>"]", "\uFE49"=>" \u0305", "\uFE4A"=>" \u0305", "\uFE4B"=>" \u0305", "\uFE4C"=>" \u0305", "\uFE4D"=>"_", "\uFE4E"=>"_", "\uFE4F"=>"_",
"\uFE50"=>",", "\uFE51"=>"\u3001", "\uFE52"=>".", "\uFE54"=>";", "\uFE55"=>":", "\uFE56"=>"?", "\uFE57"=>"!", "\uFE58"=>"\u2014",
"\uFE59"=>"(", "\uFE5A"=>")", "\uFE5B"=>"{", "\uFE5C"=>"}", "\uFE5D"=>"\u3014", "\uFE5E"=>"\u3015", "\uFE5F"=>"#", "\uFE60"=>"&",
"\uFE61"=>"*", "\uFE62"=>"+", "\uFE63"=>"-", "\uFE64"=>"<", "\uFE65"=>">", "\uFE66"=>"=", "\uFE68"=>"\\", "\uFE69"=>"$",
"\uFE6A"=>"%", "\uFE6B"=>"@", "\uFE70"=>" \u064B", "\uFE71"=>"\u0640\u064B", "\uFE72"=>" \u064C", "\uFE74"=>" \u064D", "\uFE76"=>" \u064E", "\uFE77"=>"\u0640\u064E",
"\uFE78"=>" \u064F", "\uFE79"=>"\u0640\u064F", "\uFE7A"=>" \u0650", "\uFE7B"=>"\u0640\u0650", "\uFE7C"=>" \u0651", "\uFE7D"=>"\u0640\u0651", "\uFE7E"=>" \u0652", "\uFE7F"=>"\u0640\u0652",
"\uFE80"=>"\u0621", "\uFE81"=>"\u0622", "\uFE82"=>"\u0622", "\uFE83"=>"\u0623", "\uFE84"=>"\u0623", "\uFE85"=>"\u0624", "\uFE86"=>"\u0624", "\uFE87"=>"\u0625",
"\uFE88"=>"\u0625", "\uFE89"=>"\u0626", "\uFE8A"=>"\u0626", "\uFE8B"=>"\u0626", "\uFE8C"=>"\u0626", "\uFE8D"=>"\u0627", "\uFE8E"=>"\u0627", "\uFE8F"=>"\u0628",
"\uFE90"=>"\u0628", "\uFE91"=>"\u0628", "\uFE92"=>"\u0628", "\uFE93"=>"\u0629", "\uFE94"=>"\u0629", "\uFE95"=>"\u062A", "\uFE96"=>"\u062A", "\uFE97"=>"\u062A",
"\uFE98"=>"\u062A", "\uFE99"=>"\u062B", "\uFE9A"=>"\u062B", "\uFE9B"=>"\u062B", "\uFE9C"=>"\u062B", "\uFE9D"=>"\u062C", "\uFE9E"=>"\u062C", "\uFE9F"=>"\u062C",
"\uFEA0"=>"\u062C", "\uFEA1"=>"\u062D", "\uFEA2"=>"\u062D", "\uFEA3"=>"\u062D", "\uFEA4"=>"\u062D", "\uFEA5"=>"\u062E", "\uFEA6"=>"\u062E", "\uFEA7"=>"\u062E",
"\uFEA8"=>"\u062E", "\uFEA9"=>"\u062F", "\uFEAA"=>"\u062F", "\uFEAB"=>"\u0630", "\uFEAC"=>"\u0630", "\uFEAD"=>"\u0631", "\uFEAE"=>"\u0631", "\uFEAF"=>"\u0632",
"\uFEB0"=>"\u0632", "\uFEB1"=>"\u0633", "\uFEB2"=>"\u0633", "\uFEB3"=>"\u0633", "\uFEB4"=>"\u0633", "\uFEB5"=>"\u0634", "\uFEB6"=>"\u0634", "\uFEB7"=>"\u0634",
"\uFEB8"=>"\u0634", "\uFEB9"=>"\u0635", "\uFEBA"=>"\u0635", "\uFEBB"=>"\u0635", "\uFEBC"=>"\u0635", "\uFEBD"=>"\u0636", "\uFEBE"=>"\u0636", "\uFEBF"=>"\u0636",
"\uFEC0"=>"\u0636", "\uFEC1"=>"\u0637", "\uFEC2"=>"\u0637", "\uFEC3"=>"\u0637", "\uFEC4"=>"\u0637", "\uFEC5"=>"\u0638", "\uFEC6"=>"\u0638", "\uFEC7"=>"\u0638",
"\uFEC8"=>"\u0638", "\uFEC9"=>"\u0639", "\uFECA"=>"\u0639", "\uFECB"=>"\u0639", "\uFECC"=>"\u0639", "\uFECD"=>"\u063A", "\uFECE"=>"\u063A", "\uFECF"=>"\u063A",
"\uFED0"=>"\u063A", "\uFED1"=>"\u0641", "\uFED2"=>"\u0641", "\uFED3"=>"\u0641", "\uFED4"=>"\u0641", "\uFED5"=>"\u0642", "\uFED6"=>"\u0642", "\uFED7"=>"\u0642",
"\uFED8"=>"\u0642", "\uFED9"=>"\u0643", "\uFEDA"=>"\u0643", "\uFEDB"=>"\u0643", "\uFEDC"=>"\u0643", "\uFEDD"=>"\u0644", "\uFEDE"=>"\u0644", "\uFEDF"=>"\u0644",
"\uFEE0"=>"\u0644", "\uFEE1"=>"\u0645", "\uFEE2"=>"\u0645", "\uFEE3"=>"\u0645", "\uFEE4"=>"\u0645", "\uFEE5"=>"\u0646", "\uFEE6"=>"\u0646", "\uFEE7"=>"\u0646",
"\uFEE8"=>"\u0646", "\uFEE9"=>"\u0647", "\uFEEA"=>"\u0647", "\uFEEB"=>"\u0647", "\uFEEC"=>"\u0647", "\uFEED"=>"\u0648", "\uFEEE"=>"\u0648", "\uFEEF"=>"\u0649",
"\uFEF0"=>"\u0649", "\uFEF1"=>"\u064A", "\uFEF2"=>"\u064A", "\uFEF3"=>"\u064A", "\uFEF4"=>"\u064A", "\uFEF5"=>"\u0644\u0622", "\uFEF6"=>"\u0644\u0622", "\uFEF7"=>"\u0644\u0623",
"\uFEF8"=>"\u0644\u0623", "\uFEF9"=>"\u0644\u0625", "\uFEFA"=>"\u0644\u0625", "\uFEFB"=>"\u0644\u0627", "\uFEFC"=>"\u0644\u0627", "\uFF01"=>"!", "\uFF02"=>"\"", "\uFF03"=>"#",
"\uFF04"=>"$", "\uFF05"=>"%", "\uFF06"=>"&", "\uFF07"=>"'", "\uFF08"=>"(", "\uFF09"=>")", "\uFF0A"=>"*", "\uFF0B"=>"+",
"\uFF0C"=>",", "\uFF0D"=>"-", "\uFF0E"=>".", "\uFF0F"=>"/", "\uFF10"=>"0", "\uFF11"=>"1", "\uFF12"=>"2", "\uFF13"=>"3",
"\uFF14"=>"4", "\uFF15"=>"5", "\uFF16"=>"6", "\uFF17"=>"7", "\uFF18"=>"8", "\uFF19"=>"9", "\uFF1A"=>":", "\uFF1B"=>";",
"\uFF1C"=>"<", "\uFF1D"=>"=", "\uFF1E"=>">", "\uFF1F"=>"?", "\uFF20"=>"@", "\uFF21"=>"A", "\uFF22"=>"B", "\uFF23"=>"C",
"\uFF24"=>"D", "\uFF25"=>"E", "\uFF26"=>"F", "\uFF27"=>"G", "\uFF28"=>"H", "\uFF29"=>"I", "\uFF2A"=>"J", "\uFF2B"=>"K",
"\uFF2C"=>"L", "\uFF2D"=>"M", "\uFF2E"=>"N", "\uFF2F"=>"O", "\uFF30"=>"P", "\uFF31"=>"Q", "\uFF32"=>"R", "\uFF33"=>"S",
"\uFF34"=>"T", "\uFF35"=>"U", "\uFF36"=>"V", "\uFF37"=>"W", "\uFF38"=>"X", "\uFF39"=>"Y", "\uFF3A"=>"Z", "\uFF3B"=>"[",
"\uFF3C"=>"\\", "\uFF3D"=>"]", "\uFF3E"=>"^", "\uFF3F"=>"_", "\uFF40"=>"`", "\uFF41"=>"a", "\uFF42"=>"b", "\uFF43"=>"c",
"\uFF44"=>"d", "\uFF45"=>"e", "\uFF46"=>"f", "\uFF47"=>"g", "\uFF48"=>"h", "\uFF49"=>"i", "\uFF4A"=>"j", "\uFF4B"=>"k",
"\uFF4C"=>"l", "\uFF4D"=>"m", "\uFF4E"=>"n", "\uFF4F"=>"o", "\uFF50"=>"p", "\uFF51"=>"q", "\uFF52"=>"r", "\uFF53"=>"s",
"\uFF54"=>"t", "\uFF55"=>"u", "\uFF56"=>"v", "\uFF57"=>"w", "\uFF58"=>"x", "\uFF59"=>"y", "\uFF5A"=>"z", "\uFF5B"=>"{",
"\uFF5C"=>"|", "\uFF5D"=>"}", "\uFF5E"=>"~", "\uFF5F"=>"\u2985", "\uFF60"=>"\u2986", "\uFF61"=>"\u3002", "\uFF62"=>"\u300C", "\uFF63"=>"\u300D",
"\uFF64"=>"\u3001", "\uFF65"=>"\u30FB", "\uFF66"=>"\u30F2", "\uFF67"=>"\u30A1", "\uFF68"=>"\u30A3", "\uFF69"=>"\u30A5", "\uFF6A"=>"\u30A7", "\uFF6B"=>"\u30A9",
"\uFF6C"=>"\u30E3", "\uFF6D"=>"\u30E5", "\uFF6E"=>"\u30E7", "\uFF6F"=>"\u30C3", "\uFF70"=>"\u30FC", "\uFF71"=>"\u30A2", "\uFF72"=>"\u30A4", "\uFF73"=>"\u30A6",
"\uFF74"=>"\u30A8", "\uFF75"=>"\u30AA", "\uFF76"=>"\u30AB", "\uFF77"=>"\u30AD", "\uFF78"=>"\u30AF", "\uFF79"=>"\u30B1", "\uFF7A"=>"\u30B3", "\uFF7B"=>"\u30B5",
"\uFF7C"=>"\u30B7", "\uFF7D"=>"\u30B9", "\uFF7E"=>"\u30BB", "\uFF7F"=>"\u30BD", "\uFF80"=>"\u30BF", "\uFF81"=>"\u30C1", "\uFF82"=>"\u30C4", "\uFF83"=>"\u30C6",
"\uFF84"=>"\u30C8", "\uFF85"=>"\u30CA", "\uFF86"=>"\u30CB", "\uFF87"=>"\u30CC", "\uFF88"=>"\u30CD", "\uFF89"=>"\u30CE", "\uFF8A"=>"\u30CF", "\uFF8B"=>"\u30D2",
"\uFF8C"=>"\u30D5", "\uFF8D"=>"\u30D8", "\uFF8E"=>"\u30DB", "\uFF8F"=>"\u30DE", "\uFF90"=>"\u30DF", "\uFF91"=>"\u30E0", "\uFF92"=>"\u30E1", "\uFF93"=>"\u30E2",
"\uFF94"=>"\u30E4", "\uFF95"=>"\u30E6", "\uFF96"=>"\u30E8", "\uFF97"=>"\u30E9", "\uFF98"=>"\u30EA", "\uFF99"=>"\u30EB", "\uFF9A"=>"\u30EC", "\uFF9B"=>"\u30ED",
"\uFF9C"=>"\u30EF", "\uFF9D"=>"\u30F3", "\uFF9E"=>"\u3099", "\uFF9F"=>"\u309A", "\uFFA0"=>"\u1160", "\uFFA1"=>"\u1100", "\uFFA2"=>"\u1101", "\uFFA3"=>"\u11AA",
"\uFFA4"=>"\u1102", "\uFFA5"=>"\u11AC", "\uFFA6"=>"\u11AD", "\uFFA7"=>"\u1103", "\uFFA8"=>"\u1104", "\uFFA9"=>"\u1105", "\uFFAA"=>"\u11B0", "\uFFAB"=>"\u11B1",
"\uFFAC"=>"\u11B2", "\uFFAD"=>"\u11B3", "\uFFAE"=>"\u11B4", "\uFFAF"=>"\u11B5", "\uFFB0"=>"\u111A", "\uFFB1"=>"\u1106", "\uFFB2"=>"\u1107", "\uFFB3"=>"\u1108",
"\uFFB4"=>"\u1121", "\uFFB5"=>"\u1109", "\uFFB6"=>"\u110A", "\uFFB7"=>"\u110B", "\uFFB8"=>"\u110C", "\uFFB9"=>"\u110D", "\uFFBA"=>"\u110E", "\uFFBB"=>"\u110F",
"\uFFBC"=>"\u1110", "\uFFBD"=>"\u1111", "\uFFBE"=>"\u1112", "\uFFC2"=>"\u1161", "\uFFC3"=>"\u1162", "\uFFC4"=>"\u1163", "\uFFC5"=>"\u1164", "\uFFC6"=>"\u1165",
"\uFFC7"=>"\u1166", "\uFFCA"=>"\u1167", "\uFFCB"=>"\u1168", "\uFFCC"=>"\u1169", "\uFFCD"=>"\u116A", "\uFFCE"=>"\u116B", "\uFFCF"=>"\u116C", "\uFFD2"=>"\u116D",
"\uFFD3"=>"\u116E", "\uFFD4"=>"\u116F", "\uFFD5"=>"\u1170", "\uFFD6"=>"\u1171", "\uFFD7"=>"\u1172", "\uFFDA"=>"\u1173", "\uFFDB"=>"\u1174", "\uFFDC"=>"\u1175",
"\uFFE0"=>"\u00A2", "\uFFE1"=>"\u00A3", "\uFFE2"=>"\u00AC", "\uFFE3"=>" \u0304", "\uFFE4"=>"\u00A6", "\uFFE5"=>"\u00A5", "\uFFE6"=>"\u20A9", "\uFFE8"=>"\u2502",
"\uFFE9"=>"\u2190", "\uFFEA"=>"\u2191", "\uFFEB"=>"\u2192", "\uFFEC"=>"\u2193", "\uFFED"=>"\u25A0", "\uFFEE"=>"\u25CB", "\u{1D400}"=>"A", "\u{1D401}"=>"B",
"\u{1D402}"=>"C", "\u{1D403}"=>"D", "\u{1D404}"=>"E", "\u{1D405}"=>"F", "\u{1D406}"=>"G", "\u{1D407}"=>"H", "\u{1D408}"=>"I", "\u{1D409}"=>"J",
"\u{1D40A}"=>"K", "\u{1D40B}"=>"L", "\u{1D40C}"=>"M", "\u{1D40D}"=>"N", "\u{1D40E}"=>"O", "\u{1D40F}"=>"P", "\u{1D410}"=>"Q", "\u{1D411}"=>"R",
"\u{1D412}"=>"S", "\u{1D413}"=>"T", "\u{1D414}"=>"U", "\u{1D415}"=>"V", "\u{1D416}"=>"W", "\u{1D417}"=>"X", "\u{1D418}"=>"Y", "\u{1D419}"=>"Z",
"\u{1D41A}"=>"a", "\u{1D41B}"=>"b", "\u{1D41C}"=>"c", "\u{1D41D}"=>"d", "\u{1D41E}"=>"e", "\u{1D41F}"=>"f", "\u{1D420}"=>"g", "\u{1D421}"=>"h",
"\u{1D422}"=>"i", "\u{1D423}"=>"j", "\u{1D424}"=>"k", "\u{1D425}"=>"l", "\u{1D426}"=>"m", "\u{1D427}"=>"n", "\u{1D428}"=>"o", "\u{1D429}"=>"p",
"\u{1D42A}"=>"q", "\u{1D42B}"=>"r", "\u{1D42C}"=>"s", "\u{1D42D}"=>"t", "\u{1D42E}"=>"u", "\u{1D42F}"=>"v", "\u{1D430}"=>"w", "\u{1D431}"=>"x",
"\u{1D432}"=>"y", "\u{1D433}"=>"z", "\u{1D434}"=>"A", "\u{1D435}"=>"B", "\u{1D436}"=>"C", "\u{1D437}"=>"D", "\u{1D438}"=>"E", "\u{1D439}"=>"F",
"\u{1D43A}"=>"G", "\u{1D43B}"=>"H", "\u{1D43C}"=>"I", "\u{1D43D}"=>"J", "\u{1D43E}"=>"K", "\u{1D43F}"=>"L", "\u{1D440}"=>"M", "\u{1D441}"=>"N",
"\u{1D442}"=>"O", "\u{1D443}"=>"P", "\u{1D444}"=>"Q", "\u{1D445}"=>"R", "\u{1D446}"=>"S", "\u{1D447}"=>"T", "\u{1D448}"=>"U", "\u{1D449}"=>"V",
"\u{1D44A}"=>"W", "\u{1D44B}"=>"X", "\u{1D44C}"=>"Y", "\u{1D44D}"=>"Z", "\u{1D44E}"=>"a", "\u{1D44F}"=>"b", "\u{1D450}"=>"c", "\u{1D451}"=>"d",
"\u{1D452}"=>"e", "\u{1D453}"=>"f", "\u{1D454}"=>"g", "\u{1D456}"=>"i", "\u{1D457}"=>"j", "\u{1D458}"=>"k", "\u{1D459}"=>"l", "\u{1D45A}"=>"m",
"\u{1D45B}"=>"n", "\u{1D45C}"=>"o", "\u{1D45D}"=>"p", "\u{1D45E}"=>"q", "\u{1D45F}"=>"r", "\u{1D460}"=>"s", "\u{1D461}"=>"t", "\u{1D462}"=>"u",
"\u{1D463}"=>"v", "\u{1D464}"=>"w", "\u{1D465}"=>"x", "\u{1D466}"=>"y", "\u{1D467}"=>"z", "\u{1D468}"=>"A", "\u{1D469}"=>"B", "\u{1D46A}"=>"C",
"\u{1D46B}"=>"D", "\u{1D46C}"=>"E", "\u{1D46D}"=>"F", "\u{1D46E}"=>"G", "\u{1D46F}"=>"H", "\u{1D470}"=>"I", "\u{1D471}"=>"J", "\u{1D472}"=>"K",
"\u{1D473}"=>"L", "\u{1D474}"=>"M", "\u{1D475}"=>"N", "\u{1D476}"=>"O", "\u{1D477}"=>"P", "\u{1D478}"=>"Q", "\u{1D479}"=>"R", "\u{1D47A}"=>"S",
"\u{1D47B}"=>"T", "\u{1D47C}"=>"U", "\u{1D47D}"=>"V", "\u{1D47E}"=>"W", "\u{1D47F}"=>"X", "\u{1D480}"=>"Y", "\u{1D481}"=>"Z", "\u{1D482}"=>"a",
"\u{1D483}"=>"b", "\u{1D484}"=>"c", "\u{1D485}"=>"d", "\u{1D486}"=>"e", "\u{1D487}"=>"f", "\u{1D488}"=>"g", "\u{1D489}"=>"h", "\u{1D48A}"=>"i",
"\u{1D48B}"=>"j", "\u{1D48C}"=>"k", "\u{1D48D}"=>"l", "\u{1D48E}"=>"m", "\u{1D48F}"=>"n", "\u{1D490}"=>"o", "\u{1D491}"=>"p", "\u{1D492}"=>"q",
"\u{1D493}"=>"r", "\u{1D494}"=>"s", "\u{1D495}"=>"t", "\u{1D496}"=>"u", "\u{1D497}"=>"v", "\u{1D498}"=>"w", "\u{1D499}"=>"x", "\u{1D49A}"=>"y",
"\u{1D49B}"=>"z", "\u{1D49C}"=>"A", "\u{1D49E}"=>"C", "\u{1D49F}"=>"D", "\u{1D4A2}"=>"G", "\u{1D4A5}"=>"J", "\u{1D4A6}"=>"K", "\u{1D4A9}"=>"N",
"\u{1D4AA}"=>"O", "\u{1D4AB}"=>"P", "\u{1D4AC}"=>"Q", "\u{1D4AE}"=>"S", "\u{1D4AF}"=>"T", "\u{1D4B0}"=>"U", "\u{1D4B1}"=>"V", "\u{1D4B2}"=>"W",
"\u{1D4B3}"=>"X", "\u{1D4B4}"=>"Y", "\u{1D4B5}"=>"Z", "\u{1D4B6}"=>"a", "\u{1D4B7}"=>"b", "\u{1D4B8}"=>"c", "\u{1D4B9}"=>"d", "\u{1D4BB}"=>"f",
"\u{1D4BD}"=>"h", "\u{1D4BE}"=>"i", "\u{1D4BF}"=>"j", "\u{1D4C0}"=>"k", "\u{1D4C1}"=>"l", "\u{1D4C2}"=>"m", "\u{1D4C3}"=>"n", "\u{1D4C5}"=>"p",
"\u{1D4C6}"=>"q", "\u{1D4C7}"=>"r", "\u{1D4C8}"=>"s", "\u{1D4C9}"=>"t", "\u{1D4CA}"=>"u", "\u{1D4CB}"=>"v", "\u{1D4CC}"=>"w", "\u{1D4CD}"=>"x",
"\u{1D4CE}"=>"y", "\u{1D4CF}"=>"z", "\u{1D4D0}"=>"A", "\u{1D4D1}"=>"B", "\u{1D4D2}"=>"C", "\u{1D4D3}"=>"D", "\u{1D4D4}"=>"E", "\u{1D4D5}"=>"F",
"\u{1D4D6}"=>"G", "\u{1D4D7}"=>"H", "\u{1D4D8}"=>"I", "\u{1D4D9}"=>"J", "\u{1D4DA}"=>"K", "\u{1D4DB}"=>"L", "\u{1D4DC}"=>"M", "\u{1D4DD}"=>"N",
"\u{1D4DE}"=>"O", "\u{1D4DF}"=>"P", "\u{1D4E0}"=>"Q", "\u{1D4E1}"=>"R", "\u{1D4E2}"=>"S", "\u{1D4E3}"=>"T", "\u{1D4E4}"=>"U", "\u{1D4E5}"=>"V",
"\u{1D4E6}"=>"W", "\u{1D4E7}"=>"X", "\u{1D4E8}"=>"Y", "\u{1D4E9}"=>"Z", "\u{1D4EA}"=>"a", "\u{1D4EB}"=>"b", "\u{1D4EC}"=>"c", "\u{1D4ED}"=>"d",
"\u{1D4EE}"=>"e", "\u{1D4EF}"=>"f", "\u{1D4F0}"=>"g", "\u{1D4F1}"=>"h", "\u{1D4F2}"=>"i", "\u{1D4F3}"=>"j", "\u{1D4F4}"=>"k", "\u{1D4F5}"=>"l",
"\u{1D4F6}"=>"m", "\u{1D4F7}"=>"n", "\u{1D4F8}"=>"o", "\u{1D4F9}"=>"p", "\u{1D4FA}"=>"q", "\u{1D4FB}"=>"r", "\u{1D4FC}"=>"s", "\u{1D4FD}"=>"t",
"\u{1D4FE}"=>"u", "\u{1D4FF}"=>"v", "\u{1D500}"=>"w", "\u{1D501}"=>"x", "\u{1D502}"=>"y", "\u{1D503}"=>"z", "\u{1D504}"=>"A", "\u{1D505}"=>"B",
"\u{1D507}"=>"D", "\u{1D508}"=>"E", "\u{1D509}"=>"F", "\u{1D50A}"=>"G", "\u{1D50D}"=>"J", "\u{1D50E}"=>"K", "\u{1D50F}"=>"L", "\u{1D510}"=>"M",
"\u{1D511}"=>"N", "\u{1D512}"=>"O", "\u{1D513}"=>"P", "\u{1D514}"=>"Q", "\u{1D516}"=>"S", "\u{1D517}"=>"T", "\u{1D518}"=>"U", "\u{1D519}"=>"V",
"\u{1D51A}"=>"W", "\u{1D51B}"=>"X", "\u{1D51C}"=>"Y", "\u{1D51E}"=>"a", "\u{1D51F}"=>"b", "\u{1D520}"=>"c", "\u{1D521}"=>"d", "\u{1D522}"=>"e",
"\u{1D523}"=>"f", "\u{1D524}"=>"g", "\u{1D525}"=>"h", "\u{1D526}"=>"i", "\u{1D527}"=>"j", "\u{1D528}"=>"k", "\u{1D529}"=>"l", "\u{1D52A}"=>"m",
"\u{1D52B}"=>"n", "\u{1D52C}"=>"o", "\u{1D52D}"=>"p", "\u{1D52E}"=>"q", "\u{1D52F}"=>"r", "\u{1D530}"=>"s", "\u{1D531}"=>"t", "\u{1D532}"=>"u",
"\u{1D533}"=>"v", "\u{1D534}"=>"w", "\u{1D535}"=>"x", "\u{1D536}"=>"y", "\u{1D537}"=>"z", "\u{1D538}"=>"A", "\u{1D539}"=>"B", "\u{1D53B}"=>"D",
"\u{1D53C}"=>"E", "\u{1D53D}"=>"F", "\u{1D53E}"=>"G", "\u{1D540}"=>"I", "\u{1D541}"=>"J", "\u{1D542}"=>"K", "\u{1D543}"=>"L", "\u{1D544}"=>"M",
"\u{1D546}"=>"O", "\u{1D54A}"=>"S", "\u{1D54B}"=>"T", "\u{1D54C}"=>"U", "\u{1D54D}"=>"V", "\u{1D54E}"=>"W", "\u{1D54F}"=>"X", "\u{1D550}"=>"Y",
"\u{1D552}"=>"a", "\u{1D553}"=>"b", "\u{1D554}"=>"c", "\u{1D555}"=>"d", "\u{1D556}"=>"e", "\u{1D557}"=>"f", "\u{1D558}"=>"g", "\u{1D559}"=>"h",
"\u{1D55A}"=>"i", "\u{1D55B}"=>"j", "\u{1D55C}"=>"k", "\u{1D55D}"=>"l", "\u{1D55E}"=>"m", "\u{1D55F}"=>"n", "\u{1D560}"=>"o", "\u{1D561}"=>"p",
"\u{1D562}"=>"q", "\u{1D563}"=>"r", "\u{1D564}"=>"s", "\u{1D565}"=>"t", "\u{1D566}"=>"u", "\u{1D567}"=>"v", "\u{1D568}"=>"w", "\u{1D569}"=>"x",
"\u{1D56A}"=>"y", "\u{1D56B}"=>"z", "\u{1D56C}"=>"A", "\u{1D56D}"=>"B", "\u{1D56E}"=>"C", "\u{1D56F}"=>"D", "\u{1D570}"=>"E", "\u{1D571}"=>"F",
"\u{1D572}"=>"G", "\u{1D573}"=>"H", "\u{1D574}"=>"I", "\u{1D575}"=>"J", "\u{1D576}"=>"K", "\u{1D577}"=>"L", "\u{1D578}"=>"M", "\u{1D579}"=>"N",
"\u{1D57A}"=>"O", "\u{1D57B}"=>"P", "\u{1D57C}"=>"Q", "\u{1D57D}"=>"R", "\u{1D57E}"=>"S", "\u{1D57F}"=>"T", "\u{1D580}"=>"U", "\u{1D581}"=>"V",
"\u{1D582}"=>"W", "\u{1D583}"=>"X", "\u{1D584}"=>"Y", "\u{1D585}"=>"Z", "\u{1D586}"=>"a", "\u{1D587}"=>"b", "\u{1D588}"=>"c", "\u{1D589}"=>"d",
"\u{1D58A}"=>"e", "\u{1D58B}"=>"f", "\u{1D58C}"=>"g", "\u{1D58D}"=>"h", "\u{1D58E}"=>"i", "\u{1D58F}"=>"j", "\u{1D590}"=>"k", "\u{1D591}"=>"l",
"\u{1D592}"=>"m", "\u{1D593}"=>"n", "\u{1D594}"=>"o", "\u{1D595}"=>"p", "\u{1D596}"=>"q", "\u{1D597}"=>"r", "\u{1D598}"=>"s", "\u{1D599}"=>"t",
"\u{1D59A}"=>"u", "\u{1D59B}"=>"v", "\u{1D59C}"=>"w", "\u{1D59D}"=>"x", "\u{1D59E}"=>"y", "\u{1D59F}"=>"z", "\u{1D5A0}"=>"A", "\u{1D5A1}"=>"B",
"\u{1D5A2}"=>"C", "\u{1D5A3}"=>"D", "\u{1D5A4}"=>"E", "\u{1D5A5}"=>"F", "\u{1D5A6}"=>"G", "\u{1D5A7}"=>"H", "\u{1D5A8}"=>"I", "\u{1D5A9}"=>"J",
"\u{1D5AA}"=>"K", "\u{1D5AB}"=>"L", "\u{1D5AC}"=>"M", "\u{1D5AD}"=>"N", "\u{1D5AE}"=>"O", "\u{1D5AF}"=>"P", "\u{1D5B0}"=>"Q", "\u{1D5B1}"=>"R",
"\u{1D5B2}"=>"S", "\u{1D5B3}"=>"T", "\u{1D5B4}"=>"U", "\u{1D5B5}"=>"V", "\u{1D5B6}"=>"W", "\u{1D5B7}"=>"X", "\u{1D5B8}"=>"Y", "\u{1D5B9}"=>"Z",
"\u{1D5BA}"=>"a", "\u{1D5BB}"=>"b", "\u{1D5BC}"=>"c", "\u{1D5BD}"=>"d", "\u{1D5BE}"=>"e", "\u{1D5BF}"=>"f", "\u{1D5C0}"=>"g", "\u{1D5C1}"=>"h",
"\u{1D5C2}"=>"i", "\u{1D5C3}"=>"j", "\u{1D5C4}"=>"k", "\u{1D5C5}"=>"l", "\u{1D5C6}"=>"m", "\u{1D5C7}"=>"n", "\u{1D5C8}"=>"o", "\u{1D5C9}"=>"p",
"\u{1D5CA}"=>"q", "\u{1D5CB}"=>"r", "\u{1D5CC}"=>"s", "\u{1D5CD}"=>"t", "\u{1D5CE}"=>"u", "\u{1D5CF}"=>"v", "\u{1D5D0}"=>"w", "\u{1D5D1}"=>"x",
"\u{1D5D2}"=>"y", "\u{1D5D3}"=>"z", "\u{1D5D4}"=>"A", "\u{1D5D5}"=>"B", "\u{1D5D6}"=>"C", "\u{1D5D7}"=>"D", "\u{1D5D8}"=>"E", "\u{1D5D9}"=>"F",
"\u{1D5DA}"=>"G", "\u{1D5DB}"=>"H", "\u{1D5DC}"=>"I", "\u{1D5DD}"=>"J", "\u{1D5DE}"=>"K", "\u{1D5DF}"=>"L", "\u{1D5E0}"=>"M", "\u{1D5E1}"=>"N",
"\u{1D5E2}"=>"O", "\u{1D5E3}"=>"P", "\u{1D5E4}"=>"Q", "\u{1D5E5}"=>"R", "\u{1D5E6}"=>"S", "\u{1D5E7}"=>"T", "\u{1D5E8}"=>"U", "\u{1D5E9}"=>"V",
"\u{1D5EA}"=>"W", "\u{1D5EB}"=>"X", "\u{1D5EC}"=>"Y", "\u{1D5ED}"=>"Z", "\u{1D5EE}"=>"a", "\u{1D5EF}"=>"b", "\u{1D5F0}"=>"c", "\u{1D5F1}"=>"d",
"\u{1D5F2}"=>"e", "\u{1D5F3}"=>"f", "\u{1D5F4}"=>"g", "\u{1D5F5}"=>"h", "\u{1D5F6}"=>"i", "\u{1D5F7}"=>"j", "\u{1D5F8}"=>"k", "\u{1D5F9}"=>"l",
"\u{1D5FA}"=>"m", "\u{1D5FB}"=>"n", "\u{1D5FC}"=>"o", "\u{1D5FD}"=>"p", "\u{1D5FE}"=>"q", "\u{1D5FF}"=>"r", "\u{1D600}"=>"s", "\u{1D601}"=>"t",
"\u{1D602}"=>"u", "\u{1D603}"=>"v", "\u{1D604}"=>"w", "\u{1D605}"=>"x", "\u{1D606}"=>"y", "\u{1D607}"=>"z", "\u{1D608}"=>"A", "\u{1D609}"=>"B",
"\u{1D60A}"=>"C", "\u{1D60B}"=>"D", "\u{1D60C}"=>"E", "\u{1D60D}"=>"F", "\u{1D60E}"=>"G", "\u{1D60F}"=>"H", "\u{1D610}"=>"I", "\u{1D611}"=>"J",
"\u{1D612}"=>"K", "\u{1D613}"=>"L", "\u{1D614}"=>"M", "\u{1D615}"=>"N", "\u{1D616}"=>"O", "\u{1D617}"=>"P", "\u{1D618}"=>"Q", "\u{1D619}"=>"R",
"\u{1D61A}"=>"S", "\u{1D61B}"=>"T", "\u{1D61C}"=>"U", "\u{1D61D}"=>"V", "\u{1D61E}"=>"W", "\u{1D61F}"=>"X", "\u{1D620}"=>"Y", "\u{1D621}"=>"Z",
"\u{1D622}"=>"a", "\u{1D623}"=>"b", "\u{1D624}"=>"c", "\u{1D625}"=>"d", "\u{1D626}"=>"e", "\u{1D627}"=>"f", "\u{1D628}"=>"g", "\u{1D629}"=>"h",
"\u{1D62A}"=>"i", "\u{1D62B}"=>"j", "\u{1D62C}"=>"k", "\u{1D62D}"=>"l", "\u{1D62E}"=>"m", "\u{1D62F}"=>"n", "\u{1D630}"=>"o", "\u{1D631}"=>"p",
"\u{1D632}"=>"q", "\u{1D633}"=>"r", "\u{1D634}"=>"s", "\u{1D635}"=>"t", "\u{1D636}"=>"u", "\u{1D637}"=>"v", "\u{1D638}"=>"w", "\u{1D639}"=>"x",
"\u{1D63A}"=>"y", "\u{1D63B}"=>"z", "\u{1D63C}"=>"A", "\u{1D63D}"=>"B", "\u{1D63E}"=>"C", "\u{1D63F}"=>"D", "\u{1D640}"=>"E", "\u{1D641}"=>"F",
"\u{1D642}"=>"G", "\u{1D643}"=>"H", "\u{1D644}"=>"I", "\u{1D645}"=>"J", "\u{1D646}"=>"K", "\u{1D647}"=>"L", "\u{1D648}"=>"M", "\u{1D649}"=>"N",
"\u{1D64A}"=>"O", "\u{1D64B}"=>"P", "\u{1D64C}"=>"Q", "\u{1D64D}"=>"R", "\u{1D64E}"=>"S", "\u{1D64F}"=>"T", "\u{1D650}"=>"U", "\u{1D651}"=>"V",
"\u{1D652}"=>"W", "\u{1D653}"=>"X", "\u{1D654}"=>"Y", "\u{1D655}"=>"Z", "\u{1D656}"=>"a", "\u{1D657}"=>"b", "\u{1D658}"=>"c", "\u{1D659}"=>"d",
"\u{1D65A}"=>"e", "\u{1D65B}"=>"f", "\u{1D65C}"=>"g", "\u{1D65D}"=>"h", "\u{1D65E}"=>"i", "\u{1D65F}"=>"j", "\u{1D660}"=>"k", "\u{1D661}"=>"l",
"\u{1D662}"=>"m", "\u{1D663}"=>"n", "\u{1D664}"=>"o", "\u{1D665}"=>"p", "\u{1D666}"=>"q", "\u{1D667}"=>"r", "\u{1D668}"=>"s", "\u{1D669}"=>"t",
"\u{1D66A}"=>"u", "\u{1D66B}"=>"v", "\u{1D66C}"=>"w", "\u{1D66D}"=>"x", "\u{1D66E}"=>"y", "\u{1D66F}"=>"z", "\u{1D670}"=>"A", "\u{1D671}"=>"B",
"\u{1D672}"=>"C", "\u{1D673}"=>"D", "\u{1D674}"=>"E", "\u{1D675}"=>"F", "\u{1D676}"=>"G", "\u{1D677}"=>"H", "\u{1D678}"=>"I", "\u{1D679}"=>"J",
"\u{1D67A}"=>"K", "\u{1D67B}"=>"L", "\u{1D67C}"=>"M", "\u{1D67D}"=>"N", "\u{1D67E}"=>"O", "\u{1D67F}"=>"P", "\u{1D680}"=>"Q", "\u{1D681}"=>"R",
"\u{1D682}"=>"S", "\u{1D683}"=>"T", "\u{1D684}"=>"U", "\u{1D685}"=>"V", "\u{1D686}"=>"W", "\u{1D687}"=>"X", "\u{1D688}"=>"Y", "\u{1D689}"=>"Z",
"\u{1D68A}"=>"a", "\u{1D68B}"=>"b", "\u{1D68C}"=>"c", "\u{1D68D}"=>"d", "\u{1D68E}"=>"e", "\u{1D68F}"=>"f", "\u{1D690}"=>"g", "\u{1D691}"=>"h",
"\u{1D692}"=>"i", "\u{1D693}"=>"j", "\u{1D694}"=>"k", "\u{1D695}"=>"l", "\u{1D696}"=>"m", "\u{1D697}"=>"n", "\u{1D698}"=>"o", "\u{1D699}"=>"p",
"\u{1D69A}"=>"q", "\u{1D69B}"=>"r", "\u{1D69C}"=>"s", "\u{1D69D}"=>"t", "\u{1D69E}"=>"u", "\u{1D69F}"=>"v", "\u{1D6A0}"=>"w", "\u{1D6A1}"=>"x",
"\u{1D6A2}"=>"y", "\u{1D6A3}"=>"z", "\u{1D6A4}"=>"\u0131", "\u{1D6A5}"=>"\u0237", "\u{1D6A8}"=>"\u0391", "\u{1D6A9}"=>"\u0392", "\u{1D6AA}"=>"\u0393", "\u{1D6AB}"=>"\u0394",
"\u{1D6AC}"=>"\u0395", "\u{1D6AD}"=>"\u0396", "\u{1D6AE}"=>"\u0397", "\u{1D6AF}"=>"\u0398", "\u{1D6B0}"=>"\u0399", "\u{1D6B1}"=>"\u039A", "\u{1D6B2}"=>"\u039B", "\u{1D6B3}"=>"\u039C",
"\u{1D6B4}"=>"\u039D", "\u{1D6B5}"=>"\u039E", "\u{1D6B6}"=>"\u039F", "\u{1D6B7}"=>"\u03A0", "\u{1D6B8}"=>"\u03A1", "\u{1D6B9}"=>"\u0398", "\u{1D6BA}"=>"\u03A3", "\u{1D6BB}"=>"\u03A4",
"\u{1D6BC}"=>"\u03A5", "\u{1D6BD}"=>"\u03A6", "\u{1D6BE}"=>"\u03A7", "\u{1D6BF}"=>"\u03A8", "\u{1D6C0}"=>"\u03A9", "\u{1D6C1}"=>"\u2207", "\u{1D6C2}"=>"\u03B1", "\u{1D6C3}"=>"\u03B2",
"\u{1D6C4}"=>"\u03B3", "\u{1D6C5}"=>"\u03B4", "\u{1D6C6}"=>"\u03B5", "\u{1D6C7}"=>"\u03B6", "\u{1D6C8}"=>"\u03B7", "\u{1D6C9}"=>"\u03B8", "\u{1D6CA}"=>"\u03B9", "\u{1D6CB}"=>"\u03BA",
"\u{1D6CC}"=>"\u03BB", "\u{1D6CD}"=>"\u03BC", "\u{1D6CE}"=>"\u03BD", "\u{1D6CF}"=>"\u03BE", "\u{1D6D0}"=>"\u03BF", "\u{1D6D1}"=>"\u03C0", "\u{1D6D2}"=>"\u03C1", "\u{1D6D3}"=>"\u03C2",
"\u{1D6D4}"=>"\u03C3", "\u{1D6D5}"=>"\u03C4", "\u{1D6D6}"=>"\u03C5", "\u{1D6D7}"=>"\u03C6", "\u{1D6D8}"=>"\u03C7", "\u{1D6D9}"=>"\u03C8", "\u{1D6DA}"=>"\u03C9", "\u{1D6DB}"=>"\u2202",
"\u{1D6DC}"=>"\u03B5", "\u{1D6DD}"=>"\u03B8", "\u{1D6DE}"=>"\u03BA", "\u{1D6DF}"=>"\u03C6", "\u{1D6E0}"=>"\u03C1", "\u{1D6E1}"=>"\u03C0", "\u{1D6E2}"=>"\u0391", "\u{1D6E3}"=>"\u0392",
"\u{1D6E4}"=>"\u0393", "\u{1D6E5}"=>"\u0394", "\u{1D6E6}"=>"\u0395", "\u{1D6E7}"=>"\u0396", "\u{1D6E8}"=>"\u0397", "\u{1D6E9}"=>"\u0398", "\u{1D6EA}"=>"\u0399", "\u{1D6EB}"=>"\u039A",
"\u{1D6EC}"=>"\u039B", "\u{1D6ED}"=>"\u039C", "\u{1D6EE}"=>"\u039D", "\u{1D6EF}"=>"\u039E", "\u{1D6F0}"=>"\u039F", "\u{1D6F1}"=>"\u03A0", "\u{1D6F2}"=>"\u03A1", "\u{1D6F3}"=>"\u0398",
"\u{1D6F4}"=>"\u03A3", "\u{1D6F5}"=>"\u03A4", "\u{1D6F6}"=>"\u03A5", "\u{1D6F7}"=>"\u03A6", "\u{1D6F8}"=>"\u03A7", "\u{1D6F9}"=>"\u03A8", "\u{1D6FA}"=>"\u03A9", "\u{1D6FB}"=>"\u2207",
"\u{1D6FC}"=>"\u03B1", "\u{1D6FD}"=>"\u03B2", "\u{1D6FE}"=>"\u03B3", "\u{1D6FF}"=>"\u03B4", "\u{1D700}"=>"\u03B5", "\u{1D701}"=>"\u03B6", "\u{1D702}"=>"\u03B7", "\u{1D703}"=>"\u03B8",
"\u{1D704}"=>"\u03B9", "\u{1D705}"=>"\u03BA", "\u{1D706}"=>"\u03BB", "\u{1D707}"=>"\u03BC", "\u{1D708}"=>"\u03BD", "\u{1D709}"=>"\u03BE", "\u{1D70A}"=>"\u03BF", "\u{1D70B}"=>"\u03C0",
"\u{1D70C}"=>"\u03C1", "\u{1D70D}"=>"\u03C2", "\u{1D70E}"=>"\u03C3", "\u{1D70F}"=>"\u03C4", "\u{1D710}"=>"\u03C5", "\u{1D711}"=>"\u03C6", "\u{1D712}"=>"\u03C7", "\u{1D713}"=>"\u03C8",
"\u{1D714}"=>"\u03C9", "\u{1D715}"=>"\u2202", "\u{1D716}"=>"\u03B5", "\u{1D717}"=>"\u03B8", "\u{1D718}"=>"\u03BA", "\u{1D719}"=>"\u03C6", "\u{1D71A}"=>"\u03C1", "\u{1D71B}"=>"\u03C0",
"\u{1D71C}"=>"\u0391", "\u{1D71D}"=>"\u0392", "\u{1D71E}"=>"\u0393", "\u{1D71F}"=>"\u0394", "\u{1D720}"=>"\u0395", "\u{1D721}"=>"\u0396", "\u{1D722}"=>"\u0397", "\u{1D723}"=>"\u0398",
"\u{1D724}"=>"\u0399", "\u{1D725}"=>"\u039A", "\u{1D726}"=>"\u039B", "\u{1D727}"=>"\u039C", "\u{1D728}"=>"\u039D", "\u{1D729}"=>"\u039E", "\u{1D72A}"=>"\u039F", "\u{1D72B}"=>"\u03A0",
"\u{1D72C}"=>"\u03A1", "\u{1D72D}"=>"\u0398", "\u{1D72E}"=>"\u03A3", "\u{1D72F}"=>"\u03A4", "\u{1D730}"=>"\u03A5", "\u{1D731}"=>"\u03A6", "\u{1D732}"=>"\u03A7", "\u{1D733}"=>"\u03A8",
"\u{1D734}"=>"\u03A9", "\u{1D735}"=>"\u2207", "\u{1D736}"=>"\u03B1", "\u{1D737}"=>"\u03B2", "\u{1D738}"=>"\u03B3", "\u{1D739}"=>"\u03B4", "\u{1D73A}"=>"\u03B5", "\u{1D73B}"=>"\u03B6",
"\u{1D73C}"=>"\u03B7", "\u{1D73D}"=>"\u03B8", "\u{1D73E}"=>"\u03B9", "\u{1D73F}"=>"\u03BA", "\u{1D740}"=>"\u03BB", "\u{1D741}"=>"\u03BC", "\u{1D742}"=>"\u03BD", "\u{1D743}"=>"\u03BE",
"\u{1D744}"=>"\u03BF", "\u{1D745}"=>"\u03C0", "\u{1D746}"=>"\u03C1", "\u{1D747}"=>"\u03C2", "\u{1D748}"=>"\u03C3", "\u{1D749}"=>"\u03C4", "\u{1D74A}"=>"\u03C5", "\u{1D74B}"=>"\u03C6",
"\u{1D74C}"=>"\u03C7", "\u{1D74D}"=>"\u03C8", "\u{1D74E}"=>"\u03C9", "\u{1D74F}"=>"\u2202", "\u{1D750}"=>"\u03B5", "\u{1D751}"=>"\u03B8", "\u{1D752}"=>"\u03BA", "\u{1D753}"=>"\u03C6",
"\u{1D754}"=>"\u03C1", "\u{1D755}"=>"\u03C0", "\u{1D756}"=>"\u0391", "\u{1D757}"=>"\u0392", "\u{1D758}"=>"\u0393", "\u{1D759}"=>"\u0394", "\u{1D75A}"=>"\u0395", "\u{1D75B}"=>"\u0396",
"\u{1D75C}"=>"\u0397", "\u{1D75D}"=>"\u0398", "\u{1D75E}"=>"\u0399", "\u{1D75F}"=>"\u039A", "\u{1D760}"=>"\u039B", "\u{1D761}"=>"\u039C", "\u{1D762}"=>"\u039D", "\u{1D763}"=>"\u039E",
"\u{1D764}"=>"\u039F", "\u{1D765}"=>"\u03A0", "\u{1D766}"=>"\u03A1", "\u{1D767}"=>"\u0398", "\u{1D768}"=>"\u03A3", "\u{1D769}"=>"\u03A4", "\u{1D76A}"=>"\u03A5", "\u{1D76B}"=>"\u03A6",
"\u{1D76C}"=>"\u03A7", "\u{1D76D}"=>"\u03A8", "\u{1D76E}"=>"\u03A9", "\u{1D76F}"=>"\u2207", "\u{1D770}"=>"\u03B1", "\u{1D771}"=>"\u03B2", "\u{1D772}"=>"\u03B3", "\u{1D773}"=>"\u03B4",
"\u{1D774}"=>"\u03B5", "\u{1D775}"=>"\u03B6", "\u{1D776}"=>"\u03B7", "\u{1D777}"=>"\u03B8", "\u{1D778}"=>"\u03B9", "\u{1D779}"=>"\u03BA", "\u{1D77A}"=>"\u03BB", "\u{1D77B}"=>"\u03BC",
"\u{1D77C}"=>"\u03BD", "\u{1D77D}"=>"\u03BE", "\u{1D77E}"=>"\u03BF", "\u{1D77F}"=>"\u03C0", "\u{1D780}"=>"\u03C1", "\u{1D781}"=>"\u03C2", "\u{1D782}"=>"\u03C3", "\u{1D783}"=>"\u03C4",
"\u{1D784}"=>"\u03C5", "\u{1D785}"=>"\u03C6", "\u{1D786}"=>"\u03C7", "\u{1D787}"=>"\u03C8", "\u{1D788}"=>"\u03C9", "\u{1D789}"=>"\u2202", "\u{1D78A}"=>"\u03B5", "\u{1D78B}"=>"\u03B8",
"\u{1D78C}"=>"\u03BA", "\u{1D78D}"=>"\u03C6", "\u{1D78E}"=>"\u03C1", "\u{1D78F}"=>"\u03C0", "\u{1D790}"=>"\u0391", "\u{1D791}"=>"\u0392", "\u{1D792}"=>"\u0393", "\u{1D793}"=>"\u0394",
"\u{1D794}"=>"\u0395", "\u{1D795}"=>"\u0396", "\u{1D796}"=>"\u0397", "\u{1D797}"=>"\u0398", "\u{1D798}"=>"\u0399", "\u{1D799}"=>"\u039A", "\u{1D79A}"=>"\u039B", "\u{1D79B}"=>"\u039C",
"\u{1D79C}"=>"\u039D", "\u{1D79D}"=>"\u039E", "\u{1D79E}"=>"\u039F", "\u{1D79F}"=>"\u03A0", "\u{1D7A0}"=>"\u03A1", "\u{1D7A1}"=>"\u0398", "\u{1D7A2}"=>"\u03A3", "\u{1D7A3}"=>"\u03A4",
"\u{1D7A4}"=>"\u03A5", "\u{1D7A5}"=>"\u03A6", "\u{1D7A6}"=>"\u03A7", "\u{1D7A7}"=>"\u03A8", "\u{1D7A8}"=>"\u03A9", "\u{1D7A9}"=>"\u2207", "\u{1D7AA}"=>"\u03B1", "\u{1D7AB}"=>"\u03B2",
"\u{1D7AC}"=>"\u03B3", "\u{1D7AD}"=>"\u03B4", "\u{1D7AE}"=>"\u03B5", "\u{1D7AF}"=>"\u03B6", "\u{1D7B0}"=>"\u03B7", "\u{1D7B1}"=>"\u03B8", "\u{1D7B2}"=>"\u03B9", "\u{1D7B3}"=>"\u03BA",
"\u{1D7B4}"=>"\u03BB", "\u{1D7B5}"=>"\u03BC", "\u{1D7B6}"=>"\u03BD", "\u{1D7B7}"=>"\u03BE", "\u{1D7B8}"=>"\u03BF", "\u{1D7B9}"=>"\u03C0", "\u{1D7BA}"=>"\u03C1", "\u{1D7BB}"=>"\u03C2",
"\u{1D7BC}"=>"\u03C3", "\u{1D7BD}"=>"\u03C4", "\u{1D7BE}"=>"\u03C5", "\u{1D7BF}"=>"\u03C6", "\u{1D7C0}"=>"\u03C7", "\u{1D7C1}"=>"\u03C8", "\u{1D7C2}"=>"\u03C9", "\u{1D7C3}"=>"\u2202",
"\u{1D7C4}"=>"\u03B5", "\u{1D7C5}"=>"\u03B8", "\u{1D7C6}"=>"\u03BA", "\u{1D7C7}"=>"\u03C6", "\u{1D7C8}"=>"\u03C1", "\u{1D7C9}"=>"\u03C0", "\u{1D7CA}"=>"\u03DC", "\u{1D7CB}"=>"\u03DD",
"\u{1D7CE}"=>"0", "\u{1D7CF}"=>"1", "\u{1D7D0}"=>"2", "\u{1D7D1}"=>"3", "\u{1D7D2}"=>"4", "\u{1D7D3}"=>"5", "\u{1D7D4}"=>"6", "\u{1D7D5}"=>"7",
"\u{1D7D6}"=>"8", "\u{1D7D7}"=>"9", "\u{1D7D8}"=>"0", "\u{1D7D9}"=>"1", "\u{1D7DA}"=>"2", "\u{1D7DB}"=>"3", "\u{1D7DC}"=>"4", "\u{1D7DD}"=>"5",
"\u{1D7DE}"=>"6", "\u{1D7DF}"=>"7", "\u{1D7E0}"=>"8", "\u{1D7E1}"=>"9", "\u{1D7E2}"=>"0", "\u{1D7E3}"=>"1", "\u{1D7E4}"=>"2", "\u{1D7E5}"=>"3",
"\u{1D7E6}"=>"4", "\u{1D7E7}"=>"5", "\u{1D7E8}"=>"6", "\u{1D7E9}"=>"7", "\u{1D7EA}"=>"8", "\u{1D7EB}"=>"9", "\u{1D7EC}"=>"0", "\u{1D7ED}"=>"1",
"\u{1D7EE}"=>"2", "\u{1D7EF}"=>"3", "\u{1D7F0}"=>"4", "\u{1D7F1}"=>"5", "\u{1D7F2}"=>"6", "\u{1D7F3}"=>"7", "\u{1D7F4}"=>"8", "\u{1D7F5}"=>"9",
"\u{1D7F6}"=>"0", "\u{1D7F7}"=>"1", "\u{1D7F8}"=>"2", "\u{1D7F9}"=>"3", "\u{1D7FA}"=>"4", "\u{1D7FB}"=>"5", "\u{1D7FC}"=>"6", "\u{1D7FD}"=>"7",
"\u{1D7FE}"=>"8", "\u{1D7FF}"=>"9", "\u{1EE00}"=>"\u0627", "\u{1EE01}"=>"\u0628", "\u{1EE02}"=>"\u062C", "\u{1EE03}"=>"\u062F", "\u{1EE05}"=>"\u0648", "\u{1EE06}"=>"\u0632",
"\u{1EE07}"=>"\u062D", "\u{1EE08}"=>"\u0637", "\u{1EE09}"=>"\u064A", "\u{1EE0A}"=>"\u0643", "\u{1EE0B}"=>"\u0644", "\u{1EE0C}"=>"\u0645", "\u{1EE0D}"=>"\u0646", "\u{1EE0E}"=>"\u0633",
"\u{1EE0F}"=>"\u0639", "\u{1EE10}"=>"\u0641", "\u{1EE11}"=>"\u0635", "\u{1EE12}"=>"\u0642", "\u{1EE13}"=>"\u0631", "\u{1EE14}"=>"\u0634", "\u{1EE15}"=>"\u062A", "\u{1EE16}"=>"\u062B",
"\u{1EE17}"=>"\u062E", "\u{1EE18}"=>"\u0630", "\u{1EE19}"=>"\u0636", "\u{1EE1A}"=>"\u0638", "\u{1EE1B}"=>"\u063A", "\u{1EE1C}"=>"\u066E", "\u{1EE1D}"=>"\u06BA", "\u{1EE1E}"=>"\u06A1",
"\u{1EE1F}"=>"\u066F", "\u{1EE21}"=>"\u0628", "\u{1EE22}"=>"\u062C", "\u{1EE24}"=>"\u0647", "\u{1EE27}"=>"\u062D", "\u{1EE29}"=>"\u064A", "\u{1EE2A}"=>"\u0643", "\u{1EE2B}"=>"\u0644",
"\u{1EE2C}"=>"\u0645", "\u{1EE2D}"=>"\u0646", "\u{1EE2E}"=>"\u0633", "\u{1EE2F}"=>"\u0639", "\u{1EE30}"=>"\u0641", "\u{1EE31}"=>"\u0635", "\u{1EE32}"=>"\u0642", "\u{1EE34}"=>"\u0634",
"\u{1EE35}"=>"\u062A", "\u{1EE36}"=>"\u062B", "\u{1EE37}"=>"\u062E", "\u{1EE39}"=>"\u0636", "\u{1EE3B}"=>"\u063A", "\u{1EE42}"=>"\u062C", "\u{1EE47}"=>"\u062D", "\u{1EE49}"=>"\u064A",
"\u{1EE4B}"=>"\u0644", "\u{1EE4D}"=>"\u0646", "\u{1EE4E}"=>"\u0633", "\u{1EE4F}"=>"\u0639", "\u{1EE51}"=>"\u0635", "\u{1EE52}"=>"\u0642", "\u{1EE54}"=>"\u0634", "\u{1EE57}"=>"\u062E",
"\u{1EE59}"=>"\u0636", "\u{1EE5B}"=>"\u063A", "\u{1EE5D}"=>"\u06BA", "\u{1EE5F}"=>"\u066F", "\u{1EE61}"=>"\u0628", "\u{1EE62}"=>"\u062C", "\u{1EE64}"=>"\u0647", "\u{1EE67}"=>"\u062D",
"\u{1EE68}"=>"\u0637", "\u{1EE69}"=>"\u064A", "\u{1EE6A}"=>"\u0643", "\u{1EE6C}"=>"\u0645", "\u{1EE6D}"=>"\u0646", "\u{1EE6E}"=>"\u0633", "\u{1EE6F}"=>"\u0639", "\u{1EE70}"=>"\u0641",
"\u{1EE71}"=>"\u0635", "\u{1EE72}"=>"\u0642", "\u{1EE74}"=>"\u0634", "\u{1EE75}"=>"\u062A", "\u{1EE76}"=>"\u062B", "\u{1EE77}"=>"\u062E", "\u{1EE79}"=>"\u0636", "\u{1EE7A}"=>"\u0638",
"\u{1EE7B}"=>"\u063A", "\u{1EE7C}"=>"\u066E", "\u{1EE7E}"=>"\u06A1", "\u{1EE80}"=>"\u0627", "\u{1EE81}"=>"\u0628", "\u{1EE82}"=>"\u062C", "\u{1EE83}"=>"\u062F", "\u{1EE84}"=>"\u0647",
"\u{1EE85}"=>"\u0648", "\u{1EE86}"=>"\u0632", "\u{1EE87}"=>"\u062D", "\u{1EE88}"=>"\u0637", "\u{1EE89}"=>"\u064A", "\u{1EE8B}"=>"\u0644", "\u{1EE8C}"=>"\u0645", "\u{1EE8D}"=>"\u0646",
"\u{1EE8E}"=>"\u0633", "\u{1EE8F}"=>"\u0639", "\u{1EE90}"=>"\u0641", "\u{1EE91}"=>"\u0635", "\u{1EE92}"=>"\u0642", "\u{1EE93}"=>"\u0631", "\u{1EE94}"=>"\u0634", "\u{1EE95}"=>"\u062A",
"\u{1EE96}"=>"\u062B", "\u{1EE97}"=>"\u062E", "\u{1EE98}"=>"\u0630", "\u{1EE99}"=>"\u0636", "\u{1EE9A}"=>"\u0638", "\u{1EE9B}"=>"\u063A", "\u{1EEA1}"=>"\u0628", "\u{1EEA2}"=>"\u062C",
"\u{1EEA3}"=>"\u062F", "\u{1EEA5}"=>"\u0648", "\u{1EEA6}"=>"\u0632", "\u{1EEA7}"=>"\u062D", "\u{1EEA8}"=>"\u0637", "\u{1EEA9}"=>"\u064A", "\u{1EEAB}"=>"\u0644", "\u{1EEAC}"=>"\u0645",
"\u{1EEAD}"=>"\u0646", "\u{1EEAE}"=>"\u0633", "\u{1EEAF}"=>"\u0639", "\u{1EEB0}"=>"\u0641", "\u{1EEB1}"=>"\u0635", "\u{1EEB2}"=>"\u0642", "\u{1EEB3}"=>"\u0631", "\u{1EEB4}"=>"\u0634",
"\u{1EEB5}"=>"\u062A", "\u{1EEB6}"=>"\u062B", "\u{1EEB7}"=>"\u062E", "\u{1EEB8}"=>"\u0630", "\u{1EEB9}"=>"\u0636", "\u{1EEBA}"=>"\u0638", "\u{1EEBB}"=>"\u063A", "\u{1F100}"=>"0.",
"\u{1F101}"=>"0,", "\u{1F102}"=>"1,", "\u{1F103}"=>"2,", "\u{1F104}"=>"3,", "\u{1F105}"=>"4,", "\u{1F106}"=>"5,", "\u{1F107}"=>"6,", "\u{1F108}"=>"7,",
"\u{1F109}"=>"8,", "\u{1F10A}"=>"9,", "\u{1F110}"=>"(A)", "\u{1F111}"=>"(B)", "\u{1F112}"=>"(C)", "\u{1F113}"=>"(D)", "\u{1F114}"=>"(E)", "\u{1F115}"=>"(F)",
"\u{1F116}"=>"(G)", "\u{1F117}"=>"(H)", "\u{1F118}"=>"(I)", "\u{1F119}"=>"(J)", "\u{1F11A}"=>"(K)", "\u{1F11B}"=>"(L)", "\u{1F11C}"=>"(M)", "\u{1F11D}"=>"(N)",
"\u{1F11E}"=>"(O)", "\u{1F11F}"=>"(P)", "\u{1F120}"=>"(Q)", "\u{1F121}"=>"(R)", "\u{1F122}"=>"(S)", "\u{1F123}"=>"(T)", "\u{1F124}"=>"(U)", "\u{1F125}"=>"(V)",
"\u{1F126}"=>"(W)", "\u{1F127}"=>"(X)", "\u{1F128}"=>"(Y)", "\u{1F129}"=>"(Z)", "\u{1F12A}"=>"\u3014S\u3015", "\u{1F12B}"=>"C", "\u{1F12C}"=>"R", "\u{1F12D}"=>"CD",
"\u{1F12E}"=>"WZ", "\u{1F130}"=>"A", "\u{1F131}"=>"B", "\u{1F132}"=>"C", "\u{1F133}"=>"D", "\u{1F134}"=>"E", "\u{1F135}"=>"F", "\u{1F136}"=>"G",
"\u{1F137}"=>"H", "\u{1F138}"=>"I", "\u{1F139}"=>"J", "\u{1F13A}"=>"K", "\u{1F13B}"=>"L", "\u{1F13C}"=>"M", "\u{1F13D}"=>"N", "\u{1F13E}"=>"O",
"\u{1F13F}"=>"P", "\u{1F140}"=>"Q", "\u{1F141}"=>"R", "\u{1F142}"=>"S", "\u{1F143}"=>"T", "\u{1F144}"=>"U", "\u{1F145}"=>"V", "\u{1F146}"=>"W",
"\u{1F147}"=>"X", "\u{1F148}"=>"Y", "\u{1F149}"=>"Z", "\u{1F14A}"=>"HV", "\u{1F14B}"=>"MV", "\u{1F14C}"=>"SD", "\u{1F14D}"=>"SS", "\u{1F14E}"=>"PPV",
"\u{1F14F}"=>"WC", "\u{1F16A}"=>"MC", "\u{1F16B}"=>"MD", "\u{1F190}"=>"DJ", "\u{1F200}"=>"\u307B\u304B", "\u{1F201}"=>"\u30B3\u30B3", "\u{1F202}"=>"\u30B5", "\u{1F210}"=>"\u624B",
"\u{1F211}"=>"\u5B57", "\u{1F212}"=>"\u53CC", "\u{1F213}"=>"\u30C7", "\u{1F214}"=>"\u4E8C", "\u{1F215}"=>"\u591A", "\u{1F216}"=>"\u89E3", "\u{1F217}"=>"\u5929", "\u{1F218}"=>"\u4EA4",
"\u{1F219}"=>"\u6620", "\u{1F21A}"=>"\u7121", "\u{1F21B}"=>"\u6599", "\u{1F21C}"=>"\u524D", "\u{1F21D}"=>"\u5F8C", "\u{1F21E}"=>"\u518D", "\u{1F21F}"=>"\u65B0", "\u{1F220}"=>"\u521D",
"\u{1F221}"=>"\u7D42", "\u{1F222}"=>"\u751F", "\u{1F223}"=>"\u8CA9", "\u{1F224}"=>"\u58F0", "\u{1F225}"=>"\u5439", "\u{1F226}"=>"\u6F14", "\u{1F227}"=>"\u6295", "\u{1F228}"=>"\u6355",
"\u{1F229}"=>"\u4E00", "\u{1F22A}"=>"\u4E09", "\u{1F22B}"=>"\u904A", "\u{1F22C}"=>"\u5DE6", "\u{1F22D}"=>"\u4E2D", "\u{1F22E}"=>"\u53F3", "\u{1F22F}"=>"\u6307", "\u{1F230}"=>"\u8D70",
"\u{1F231}"=>"\u6253", "\u{1F232}"=>"\u7981", "\u{1F233}"=>"\u7A7A", "\u{1F234}"=>"\u5408", "\u{1F235}"=>"\u6E80", "\u{1F236}"=>"\u6709", "\u{1F237}"=>"\u6708", "\u{1F238}"=>"\u7533",
"\u{1F239}"=>"\u5272", "\u{1F23A}"=>"\u55B6", "\u{1F23B}"=>"\u914D", "\u{1F240}"=>"\u3014\u672C\u3015", "\u{1F241}"=>"\u3014\u4E09\u3015", "\u{1F242}"=>"\u3014\u4E8C\u3015", "\u{1F243}"=>"\u3014\u5B89\u3015", "\u{1F244}"=>"\u3014\u70B9\u3015",
"\u{1F245}"=>"\u3014\u6253\u3015", "\u{1F246}"=>"\u3014\u76D7\u3015", "\u{1F247}"=>"\u3014\u52DD\u3015", "\u{1F248}"=>"\u3014\u6557\u3015", "\u{1F250}"=>"\u5F97", "\u{1F251}"=>"\u53EF", "\u0385"=>" \u0308\u0301", "\u03D3"=>"\u03A5\u0301",
"\u03D4"=>"\u03A5\u0308", "\u1E9B"=>"s\u0307", "\u1FC1"=>" \u0308\u0342", "\u1FCD"=>" \u0313\u0300", "\u1FCE"=>" \u0313\u0301", "\u1FCF"=>" \u0313\u0342", "\u1FDD"=>" \u0314\u0300", "\u1FDE"=>" \u0314\u0301",
"\u1FDF"=>" \u0314\u0342", "\u1FED"=>" \u0308\u0300", "\u1FEE"=>" \u0308\u0301", "\u1FFD"=>" \u0301", "\u2000"=>" ", "\u2001"=>" ",
}.freeze
COMPOSITION_TABLE = {
"A\u0300"=>"\u00C0", "A\u0301"=>"\u00C1", "A\u0302"=>"\u00C2", "A\u0303"=>"\u00C3", "A\u0308"=>"\u00C4", "A\u030A"=>"\u00C5", "C\u0327"=>"\u00C7", "E\u0300"=>"\u00C8",
"E\u0301"=>"\u00C9", "E\u0302"=>"\u00CA", "E\u0308"=>"\u00CB", "I\u0300"=>"\u00CC", "I\u0301"=>"\u00CD", "I\u0302"=>"\u00CE", "I\u0308"=>"\u00CF", "N\u0303"=>"\u00D1",
"O\u0300"=>"\u00D2", "O\u0301"=>"\u00D3", "O\u0302"=>"\u00D4", "O\u0303"=>"\u00D5", "O\u0308"=>"\u00D6", "U\u0300"=>"\u00D9", "U\u0301"=>"\u00DA", "U\u0302"=>"\u00DB",
"U\u0308"=>"\u00DC", "Y\u0301"=>"\u00DD", "a\u0300"=>"\u00E0", "a\u0301"=>"\u00E1", "a\u0302"=>"\u00E2", "a\u0303"=>"\u00E3", "a\u0308"=>"\u00E4", "a\u030A"=>"\u00E5",
"c\u0327"=>"\u00E7", "e\u0300"=>"\u00E8", "e\u0301"=>"\u00E9", "e\u0302"=>"\u00EA", "e\u0308"=>"\u00EB", "i\u0300"=>"\u00EC", "i\u0301"=>"\u00ED", "i\u0302"=>"\u00EE",
"i\u0308"=>"\u00EF", "n\u0303"=>"\u00F1", "o\u0300"=>"\u00F2", "o\u0301"=>"\u00F3", "o\u0302"=>"\u00F4", "o\u0303"=>"\u00F5", "o\u0308"=>"\u00F6", "u\u0300"=>"\u00F9",
"u\u0301"=>"\u00FA", "u\u0302"=>"\u00FB", "u\u0308"=>"\u00FC", "y\u0301"=>"\u00FD", "y\u0308"=>"\u00FF", "A\u0304"=>"\u0100", "a\u0304"=>"\u0101", "A\u0306"=>"\u0102",
"a\u0306"=>"\u0103", "A\u0328"=>"\u0104", "a\u0328"=>"\u0105", "C\u0301"=>"\u0106", "c\u0301"=>"\u0107", "C\u0302"=>"\u0108", "c\u0302"=>"\u0109", "C\u0307"=>"\u010A",
"c\u0307"=>"\u010B", "C\u030C"=>"\u010C", "c\u030C"=>"\u010D", "D\u030C"=>"\u010E", "d\u030C"=>"\u010F", "E\u0304"=>"\u0112", "e\u0304"=>"\u0113", "E\u0306"=>"\u0114",
"e\u0306"=>"\u0115", "E\u0307"=>"\u0116", "e\u0307"=>"\u0117", "E\u0328"=>"\u0118", "e\u0328"=>"\u0119", "E\u030C"=>"\u011A", "e\u030C"=>"\u011B", "G\u0302"=>"\u011C",
"g\u0302"=>"\u011D", "G\u0306"=>"\u011E", "g\u0306"=>"\u011F", "G\u0307"=>"\u0120", "g\u0307"=>"\u0121", "G\u0327"=>"\u0122", "g\u0327"=>"\u0123", "H\u0302"=>"\u0124",
"h\u0302"=>"\u0125", "I\u0303"=>"\u0128", "i\u0303"=>"\u0129", "I\u0304"=>"\u012A", "i\u0304"=>"\u012B", "I\u0306"=>"\u012C", "i\u0306"=>"\u012D", "I\u0328"=>"\u012E",
"i\u0328"=>"\u012F", "I\u0307"=>"\u0130", "J\u0302"=>"\u0134", "j\u0302"=>"\u0135", "K\u0327"=>"\u0136", "k\u0327"=>"\u0137", "L\u0301"=>"\u0139", "l\u0301"=>"\u013A",
"L\u0327"=>"\u013B", "l\u0327"=>"\u013C", "L\u030C"=>"\u013D", "l\u030C"=>"\u013E", "N\u0301"=>"\u0143", "n\u0301"=>"\u0144", "N\u0327"=>"\u0145", "n\u0327"=>"\u0146",
"N\u030C"=>"\u0147", "n\u030C"=>"\u0148", "O\u0304"=>"\u014C", "o\u0304"=>"\u014D", "O\u0306"=>"\u014E", "o\u0306"=>"\u014F", "O\u030B"=>"\u0150", "o\u030B"=>"\u0151",
"R\u0301"=>"\u0154", "r\u0301"=>"\u0155", "R\u0327"=>"\u0156", "r\u0327"=>"\u0157", "R\u030C"=>"\u0158", "r\u030C"=>"\u0159", "S\u0301"=>"\u015A", "s\u0301"=>"\u015B",
"S\u0302"=>"\u015C", "s\u0302"=>"\u015D", "S\u0327"=>"\u015E", "s\u0327"=>"\u015F", "S\u030C"=>"\u0160", "s\u030C"=>"\u0161", "T\u0327"=>"\u0162", "t\u0327"=>"\u0163",
"T\u030C"=>"\u0164", "t\u030C"=>"\u0165", "U\u0303"=>"\u0168", "u\u0303"=>"\u0169", "U\u0304"=>"\u016A", "u\u0304"=>"\u016B", "U\u0306"=>"\u016C", "u\u0306"=>"\u016D",
"U\u030A"=>"\u016E", "u\u030A"=>"\u016F", "U\u030B"=>"\u0170", "u\u030B"=>"\u0171", "U\u0328"=>"\u0172", "u\u0328"=>"\u0173", "W\u0302"=>"\u0174", "w\u0302"=>"\u0175",
"Y\u0302"=>"\u0176", "y\u0302"=>"\u0177", "Y\u0308"=>"\u0178", "Z\u0301"=>"\u0179", "z\u0301"=>"\u017A", "Z\u0307"=>"\u017B", "z\u0307"=>"\u017C", "Z\u030C"=>"\u017D",
"z\u030C"=>"\u017E", "O\u031B"=>"\u01A0", "o\u031B"=>"\u01A1", "U\u031B"=>"\u01AF", "u\u031B"=>"\u01B0", "A\u030C"=>"\u01CD", "a\u030C"=>"\u01CE", "I\u030C"=>"\u01CF",
"i\u030C"=>"\u01D0", "O\u030C"=>"\u01D1", "o\u030C"=>"\u01D2", "U\u030C"=>"\u01D3", "u\u030C"=>"\u01D4", "\u00DC\u0304"=>"\u01D5", "\u00FC\u0304"=>"\u01D6", "\u00DC\u0301"=>"\u01D7",
"\u00FC\u0301"=>"\u01D8", "\u00DC\u030C"=>"\u01D9", "\u00FC\u030C"=>"\u01DA", "\u00DC\u0300"=>"\u01DB", "\u00FC\u0300"=>"\u01DC", "\u00C4\u0304"=>"\u01DE", "\u00E4\u0304"=>"\u01DF", "\u0226\u0304"=>"\u01E0",
"\u0227\u0304"=>"\u01E1", "\u00C6\u0304"=>"\u01E2", "\u00E6\u0304"=>"\u01E3", "G\u030C"=>"\u01E6", "g\u030C"=>"\u01E7", "K\u030C"=>"\u01E8", "k\u030C"=>"\u01E9", "O\u0328"=>"\u01EA",
"o\u0328"=>"\u01EB", "\u01EA\u0304"=>"\u01EC", "\u01EB\u0304"=>"\u01ED", "\u01B7\u030C"=>"\u01EE", "\u0292\u030C"=>"\u01EF", "j\u030C"=>"\u01F0", "G\u0301"=>"\u01F4", "g\u0301"=>"\u01F5",
"N\u0300"=>"\u01F8", "n\u0300"=>"\u01F9", "\u00C5\u0301"=>"\u01FA", "\u00E5\u0301"=>"\u01FB", "\u00C6\u0301"=>"\u01FC", "\u00E6\u0301"=>"\u01FD", "\u00D8\u0301"=>"\u01FE", "\u00F8\u0301"=>"\u01FF",
"A\u030F"=>"\u0200", "a\u030F"=>"\u0201", "A\u0311"=>"\u0202", "a\u0311"=>"\u0203", "E\u030F"=>"\u0204", "e\u030F"=>"\u0205", "E\u0311"=>"\u0206", "e\u0311"=>"\u0207",
"I\u030F"=>"\u0208", "i\u030F"=>"\u0209", "I\u0311"=>"\u020A", "i\u0311"=>"\u020B", "O\u030F"=>"\u020C", "o\u030F"=>"\u020D", "O\u0311"=>"\u020E", "o\u0311"=>"\u020F",
"R\u030F"=>"\u0210", "r\u030F"=>"\u0211", "R\u0311"=>"\u0212", "r\u0311"=>"\u0213", "U\u030F"=>"\u0214", "u\u030F"=>"\u0215", "U\u0311"=>"\u0216", "u\u0311"=>"\u0217",
"S\u0326"=>"\u0218", "s\u0326"=>"\u0219", "T\u0326"=>"\u021A", "t\u0326"=>"\u021B", "H\u030C"=>"\u021E", "h\u030C"=>"\u021F", "A\u0307"=>"\u0226", "a\u0307"=>"\u0227",
"E\u0327"=>"\u0228", "e\u0327"=>"\u0229", "\u00D6\u0304"=>"\u022A", "\u00F6\u0304"=>"\u022B", "\u00D5\u0304"=>"\u022C", "\u00F5\u0304"=>"\u022D", "O\u0307"=>"\u022E", "o\u0307"=>"\u022F",
"\u022E\u0304"=>"\u0230", "\u022F\u0304"=>"\u0231", "Y\u0304"=>"\u0232", "y\u0304"=>"\u0233", "\u00A8\u0301"=>"\u0385", "\u0391\u0301"=>"\u0386", "\u0395\u0301"=>"\u0388", "\u0397\u0301"=>"\u0389",
"\u0399\u0301"=>"\u038A", "\u039F\u0301"=>"\u038C", "\u03A5\u0301"=>"\u038E", "\u03A9\u0301"=>"\u038F", "\u03CA\u0301"=>"\u0390", "\u0399\u0308"=>"\u03AA", "\u03A5\u0308"=>"\u03AB", "\u03B1\u0301"=>"\u03AC",
"\u03B5\u0301"=>"\u03AD", "\u03B7\u0301"=>"\u03AE", "\u03B9\u0301"=>"\u03AF", "\u03CB\u0301"=>"\u03B0", "\u03B9\u0308"=>"\u03CA", "\u03C5\u0308"=>"\u03CB", "\u03BF\u0301"=>"\u03CC", "\u03C5\u0301"=>"\u03CD",
"\u03C9\u0301"=>"\u03CE", "\u03D2\u0301"=>"\u03D3", "\u03D2\u0308"=>"\u03D4", "\u0415\u0300"=>"\u0400", "\u0415\u0308"=>"\u0401", "\u0413\u0301"=>"\u0403", "\u0406\u0308"=>"\u0407", "\u041A\u0301"=>"\u040C",
"\u0418\u0300"=>"\u040D", "\u0423\u0306"=>"\u040E", "\u0418\u0306"=>"\u0419", "\u0438\u0306"=>"\u0439", "\u0435\u0300"=>"\u0450", "\u0435\u0308"=>"\u0451", "\u0433\u0301"=>"\u0453", "\u0456\u0308"=>"\u0457",
"\u043A\u0301"=>"\u045C", "\u0438\u0300"=>"\u045D", "\u0443\u0306"=>"\u045E", "\u0474\u030F"=>"\u0476", "\u0475\u030F"=>"\u0477", "\u0416\u0306"=>"\u04C1", "\u0436\u0306"=>"\u04C2", "\u0410\u0306"=>"\u04D0",
"\u0430\u0306"=>"\u04D1", "\u0410\u0308"=>"\u04D2", "\u0430\u0308"=>"\u04D3", "\u0415\u0306"=>"\u04D6", "\u0435\u0306"=>"\u04D7", "\u04D8\u0308"=>"\u04DA", "\u04D9\u0308"=>"\u04DB", "\u0416\u0308"=>"\u04DC",
"\u0436\u0308"=>"\u04DD", "\u0417\u0308"=>"\u04DE", "\u0437\u0308"=>"\u04DF", "\u0418\u0304"=>"\u04E2", "\u0438\u0304"=>"\u04E3", "\u0418\u0308"=>"\u04E4", "\u0438\u0308"=>"\u04E5", "\u041E\u0308"=>"\u04E6",
"\u043E\u0308"=>"\u04E7", "\u04E8\u0308"=>"\u04EA", "\u04E9\u0308"=>"\u04EB", "\u042D\u0308"=>"\u04EC", "\u044D\u0308"=>"\u04ED", "\u0423\u0304"=>"\u04EE", "\u0443\u0304"=>"\u04EF", "\u0423\u0308"=>"\u04F0",
"\u0443\u0308"=>"\u04F1", "\u0423\u030B"=>"\u04F2", "\u0443\u030B"=>"\u04F3", "\u0427\u0308"=>"\u04F4", "\u0447\u0308"=>"\u04F5", "\u042B\u0308"=>"\u04F8", "\u044B\u0308"=>"\u04F9", "\u0627\u0653"=>"\u0622",
"\u0627\u0654"=>"\u0623", "\u0648\u0654"=>"\u0624", "\u0627\u0655"=>"\u0625", "\u064A\u0654"=>"\u0626", "\u06D5\u0654"=>"\u06C0", "\u06C1\u0654"=>"\u06C2", "\u06D2\u0654"=>"\u06D3", "\u0928\u093C"=>"\u0929",
"\u0930\u093C"=>"\u0931", "\u0933\u093C"=>"\u0934", "\u09C7\u09BE"=>"\u09CB", "\u09C7\u09D7"=>"\u09CC", "\u0B47\u0B56"=>"\u0B48", "\u0B47\u0B3E"=>"\u0B4B", "\u0B47\u0B57"=>"\u0B4C", "\u0B92\u0BD7"=>"\u0B94",
"\u0BC6\u0BBE"=>"\u0BCA", "\u0BC7\u0BBE"=>"\u0BCB", "\u0BC6\u0BD7"=>"\u0BCC", "\u0C46\u0C56"=>"\u0C48", "\u0CBF\u0CD5"=>"\u0CC0", "\u0CC6\u0CD5"=>"\u0CC7", "\u0CC6\u0CD6"=>"\u0CC8", "\u0CC6\u0CC2"=>"\u0CCA",
"\u0CCA\u0CD5"=>"\u0CCB", "\u0D46\u0D3E"=>"\u0D4A", "\u0D47\u0D3E"=>"\u0D4B", "\u0D46\u0D57"=>"\u0D4C", "\u0DD9\u0DCA"=>"\u0DDA", "\u0DD9\u0DCF"=>"\u0DDC", "\u0DDC\u0DCA"=>"\u0DDD", "\u0DD9\u0DDF"=>"\u0DDE",
"\u1025\u102E"=>"\u1026", "\u1B05\u1B35"=>"\u1B06", "\u1B07\u1B35"=>"\u1B08", "\u1B09\u1B35"=>"\u1B0A", "\u1B0B\u1B35"=>"\u1B0C", "\u1B0D\u1B35"=>"\u1B0E", "\u1B11\u1B35"=>"\u1B12", "\u1B3A\u1B35"=>"\u1B3B",
"\u1B3C\u1B35"=>"\u1B3D", "\u1B3E\u1B35"=>"\u1B40", "\u1B3F\u1B35"=>"\u1B41", "\u1B42\u1B35"=>"\u1B43", "A\u0325"=>"\u1E00", "a\u0325"=>"\u1E01", "B\u0307"=>"\u1E02", "b\u0307"=>"\u1E03",
"B\u0323"=>"\u1E04", "b\u0323"=>"\u1E05", "B\u0331"=>"\u1E06", "b\u0331"=>"\u1E07", "\u00C7\u0301"=>"\u1E08", "\u00E7\u0301"=>"\u1E09", "D\u0307"=>"\u1E0A", "d\u0307"=>"\u1E0B",
"D\u0323"=>"\u1E0C", "d\u0323"=>"\u1E0D", "D\u0331"=>"\u1E0E", "d\u0331"=>"\u1E0F", "D\u0327"=>"\u1E10", "d\u0327"=>"\u1E11", "D\u032D"=>"\u1E12", "d\u032D"=>"\u1E13",
"\u0112\u0300"=>"\u1E14", "\u0113\u0300"=>"\u1E15", "\u0112\u0301"=>"\u1E16", "\u0113\u0301"=>"\u1E17", "E\u032D"=>"\u1E18", "e\u032D"=>"\u1E19", "E\u0330"=>"\u1E1A", "e\u0330"=>"\u1E1B",
"\u0228\u0306"=>"\u1E1C", "\u0229\u0306"=>"\u1E1D", "F\u0307"=>"\u1E1E", "f\u0307"=>"\u1E1F", "G\u0304"=>"\u1E20", "g\u0304"=>"\u1E21", "H\u0307"=>"\u1E22", "h\u0307"=>"\u1E23",
"H\u0323"=>"\u1E24", "h\u0323"=>"\u1E25", "H\u0308"=>"\u1E26", "h\u0308"=>"\u1E27", "H\u0327"=>"\u1E28", "h\u0327"=>"\u1E29", "H\u032E"=>"\u1E2A", "h\u032E"=>"\u1E2B",
"I\u0330"=>"\u1E2C", "i\u0330"=>"\u1E2D", "\u00CF\u0301"=>"\u1E2E", "\u00EF\u0301"=>"\u1E2F", "K\u0301"=>"\u1E30", "k\u0301"=>"\u1E31", "K\u0323"=>"\u1E32", "k\u0323"=>"\u1E33",
"K\u0331"=>"\u1E34", "k\u0331"=>"\u1E35", "L\u0323"=>"\u1E36", "l\u0323"=>"\u1E37", "\u1E36\u0304"=>"\u1E38", "\u1E37\u0304"=>"\u1E39", "L\u0331"=>"\u1E3A", "l\u0331"=>"\u1E3B",
"L\u032D"=>"\u1E3C", "l\u032D"=>"\u1E3D", "M\u0301"=>"\u1E3E", "m\u0301"=>"\u1E3F", "M\u0307"=>"\u1E40", "m\u0307"=>"\u1E41", "M\u0323"=>"\u1E42", "m\u0323"=>"\u1E43",
"N\u0307"=>"\u1E44", "n\u0307"=>"\u1E45", "N\u0323"=>"\u1E46", "n\u0323"=>"\u1E47", "N\u0331"=>"\u1E48", "n\u0331"=>"\u1E49", "N\u032D"=>"\u1E4A", "n\u032D"=>"\u1E4B",
"\u00D5\u0301"=>"\u1E4C", "\u00F5\u0301"=>"\u1E4D", "\u00D5\u0308"=>"\u1E4E", "\u00F5\u0308"=>"\u1E4F", "\u014C\u0300"=>"\u1E50", "\u014D\u0300"=>"\u1E51", "\u014C\u0301"=>"\u1E52", "\u014D\u0301"=>"\u1E53",
"P\u0301"=>"\u1E54", "p\u0301"=>"\u1E55", "P\u0307"=>"\u1E56", "p\u0307"=>"\u1E57", "R\u0307"=>"\u1E58", "r\u0307"=>"\u1E59", "R\u0323"=>"\u1E5A", "r\u0323"=>"\u1E5B",
"\u1E5A\u0304"=>"\u1E5C", "\u1E5B\u0304"=>"\u1E5D", "R\u0331"=>"\u1E5E", "r\u0331"=>"\u1E5F", "S\u0307"=>"\u1E60", "s\u0307"=>"\u1E61", "S\u0323"=>"\u1E62", "s\u0323"=>"\u1E63",
"\u015A\u0307"=>"\u1E64", "\u015B\u0307"=>"\u1E65", "\u0160\u0307"=>"\u1E66", "\u0161\u0307"=>"\u1E67", "\u1E62\u0307"=>"\u1E68", "\u1E63\u0307"=>"\u1E69", "T\u0307"=>"\u1E6A", "t\u0307"=>"\u1E6B",
"T\u0323"=>"\u1E6C", "t\u0323"=>"\u1E6D", "T\u0331"=>"\u1E6E", "t\u0331"=>"\u1E6F", "T\u032D"=>"\u1E70", "t\u032D"=>"\u1E71", "U\u0324"=>"\u1E72", "u\u0324"=>"\u1E73",
"U\u0330"=>"\u1E74", "u\u0330"=>"\u1E75", "U\u032D"=>"\u1E76", "u\u032D"=>"\u1E77", "\u0168\u0301"=>"\u1E78", "\u0169\u0301"=>"\u1E79", "\u016A\u0308"=>"\u1E7A", "\u016B\u0308"=>"\u1E7B",
"V\u0303"=>"\u1E7C", "v\u0303"=>"\u1E7D", "V\u0323"=>"\u1E7E", "v\u0323"=>"\u1E7F", "W\u0300"=>"\u1E80", "w\u0300"=>"\u1E81", "W\u0301"=>"\u1E82", "w\u0301"=>"\u1E83",
"W\u0308"=>"\u1E84", "w\u0308"=>"\u1E85", "W\u0307"=>"\u1E86", "w\u0307"=>"\u1E87", "W\u0323"=>"\u1E88", "w\u0323"=>"\u1E89", "X\u0307"=>"\u1E8A", "x\u0307"=>"\u1E8B",
"X\u0308"=>"\u1E8C", "x\u0308"=>"\u1E8D", "Y\u0307"=>"\u1E8E", "y\u0307"=>"\u1E8F", "Z\u0302"=>"\u1E90", "z\u0302"=>"\u1E91", "Z\u0323"=>"\u1E92", "z\u0323"=>"\u1E93",
"Z\u0331"=>"\u1E94", "z\u0331"=>"\u1E95", "h\u0331"=>"\u1E96", "t\u0308"=>"\u1E97", "w\u030A"=>"\u1E98", "y\u030A"=>"\u1E99", "\u017F\u0307"=>"\u1E9B", "A\u0323"=>"\u1EA0",
"a\u0323"=>"\u1EA1", "A\u0309"=>"\u1EA2", "a\u0309"=>"\u1EA3", "\u00C2\u0301"=>"\u1EA4", "\u00E2\u0301"=>"\u1EA5", "\u00C2\u0300"=>"\u1EA6", "\u00E2\u0300"=>"\u1EA7", "\u00C2\u0309"=>"\u1EA8",
"\u00E2\u0309"=>"\u1EA9", "\u00C2\u0303"=>"\u1EAA", "\u00E2\u0303"=>"\u1EAB", "\u1EA0\u0302"=>"\u1EAC", "\u1EA1\u0302"=>"\u1EAD", "\u0102\u0301"=>"\u1EAE", "\u0103\u0301"=>"\u1EAF", "\u0102\u0300"=>"\u1EB0",
"\u0103\u0300"=>"\u1EB1", "\u0102\u0309"=>"\u1EB2", "\u0103\u0309"=>"\u1EB3", "\u0102\u0303"=>"\u1EB4", "\u0103\u0303"=>"\u1EB5", "\u1EA0\u0306"=>"\u1EB6", "\u1EA1\u0306"=>"\u1EB7", "E\u0323"=>"\u1EB8",
"e\u0323"=>"\u1EB9", "E\u0309"=>"\u1EBA", "e\u0309"=>"\u1EBB", "E\u0303"=>"\u1EBC", "e\u0303"=>"\u1EBD", "\u00CA\u0301"=>"\u1EBE", "\u00EA\u0301"=>"\u1EBF", "\u00CA\u0300"=>"\u1EC0",
"\u00EA\u0300"=>"\u1EC1", "\u00CA\u0309"=>"\u1EC2", "\u00EA\u0309"=>"\u1EC3", "\u00CA\u0303"=>"\u1EC4", "\u00EA\u0303"=>"\u1EC5", "\u1EB8\u0302"=>"\u1EC6", "\u1EB9\u0302"=>"\u1EC7", "I\u0309"=>"\u1EC8",
"i\u0309"=>"\u1EC9", "I\u0323"=>"\u1ECA", "i\u0323"=>"\u1ECB", "O\u0323"=>"\u1ECC", "o\u0323"=>"\u1ECD", "O\u0309"=>"\u1ECE", "o\u0309"=>"\u1ECF", "\u00D4\u0301"=>"\u1ED0",
"\u00F4\u0301"=>"\u1ED1", "\u00D4\u0300"=>"\u1ED2", "\u00F4\u0300"=>"\u1ED3", "\u00D4\u0309"=>"\u1ED4", "\u00F4\u0309"=>"\u1ED5", "\u00D4\u0303"=>"\u1ED6", "\u00F4\u0303"=>"\u1ED7", "\u1ECC\u0302"=>"\u1ED8",
"\u1ECD\u0302"=>"\u1ED9", "\u01A0\u0301"=>"\u1EDA", "\u01A1\u0301"=>"\u1EDB", "\u01A0\u0300"=>"\u1EDC", "\u01A1\u0300"=>"\u1EDD", "\u01A0\u0309"=>"\u1EDE", "\u01A1\u0309"=>"\u1EDF", "\u01A0\u0303"=>"\u1EE0",
"\u01A1\u0303"=>"\u1EE1", "\u01A0\u0323"=>"\u1EE2", "\u01A1\u0323"=>"\u1EE3", "U\u0323"=>"\u1EE4", "u\u0323"=>"\u1EE5", "U\u0309"=>"\u1EE6", "u\u0309"=>"\u1EE7", "\u01AF\u0301"=>"\u1EE8",
"\u01B0\u0301"=>"\u1EE9", "\u01AF\u0300"=>"\u1EEA", "\u01B0\u0300"=>"\u1EEB", "\u01AF\u0309"=>"\u1EEC", "\u01B0\u0309"=>"\u1EED", "\u01AF\u0303"=>"\u1EEE", "\u01B0\u0303"=>"\u1EEF", "\u01AF\u0323"=>"\u1EF0",
"\u01B0\u0323"=>"\u1EF1", "Y\u0300"=>"\u1EF2", "y\u0300"=>"\u1EF3", "Y\u0323"=>"\u1EF4", "y\u0323"=>"\u1EF5", "Y\u0309"=>"\u1EF6", "y\u0309"=>"\u1EF7", "Y\u0303"=>"\u1EF8",
"y\u0303"=>"\u1EF9", "\u03B1\u0313"=>"\u1F00", "\u03B1\u0314"=>"\u1F01", "\u1F00\u0300"=>"\u1F02", "\u1F01\u0300"=>"\u1F03", "\u1F00\u0301"=>"\u1F04", "\u1F01\u0301"=>"\u1F05", "\u1F00\u0342"=>"\u1F06",
"\u1F01\u0342"=>"\u1F07", "\u0391\u0313"=>"\u1F08", "\u0391\u0314"=>"\u1F09", "\u1F08\u0300"=>"\u1F0A", "\u1F09\u0300"=>"\u1F0B", "\u1F08\u0301"=>"\u1F0C", "\u1F09\u0301"=>"\u1F0D", "\u1F08\u0342"=>"\u1F0E",
"\u1F09\u0342"=>"\u1F0F", "\u03B5\u0313"=>"\u1F10", "\u03B5\u0314"=>"\u1F11", "\u1F10\u0300"=>"\u1F12", "\u1F11\u0300"=>"\u1F13", "\u1F10\u0301"=>"\u1F14", "\u1F11\u0301"=>"\u1F15", "\u0395\u0313"=>"\u1F18",
"\u0395\u0314"=>"\u1F19", "\u1F18\u0300"=>"\u1F1A", "\u1F19\u0300"=>"\u1F1B", "\u1F18\u0301"=>"\u1F1C", "\u1F19\u0301"=>"\u1F1D", "\u03B7\u0313"=>"\u1F20", "\u03B7\u0314"=>"\u1F21", "\u1F20\u0300"=>"\u1F22",
"\u1F21\u0300"=>"\u1F23", "\u1F20\u0301"=>"\u1F24", "\u1F21\u0301"=>"\u1F25", "\u1F20\u0342"=>"\u1F26", "\u1F21\u0342"=>"\u1F27", "\u0397\u0313"=>"\u1F28", "\u0397\u0314"=>"\u1F29", "\u1F28\u0300"=>"\u1F2A",
"\u1F29\u0300"=>"\u1F2B", "\u1F28\u0301"=>"\u1F2C", "\u1F29\u0301"=>"\u1F2D", "\u1F28\u0342"=>"\u1F2E", "\u1F29\u0342"=>"\u1F2F", "\u03B9\u0313"=>"\u1F30", "\u03B9\u0314"=>"\u1F31", "\u1F30\u0300"=>"\u1F32",
"\u1F31\u0300"=>"\u1F33", "\u1F30\u0301"=>"\u1F34", "\u1F31\u0301"=>"\u1F35", "\u1F30\u0342"=>"\u1F36", "\u1F31\u0342"=>"\u1F37", "\u0399\u0313"=>"\u1F38", "\u0399\u0314"=>"\u1F39", "\u1F38\u0300"=>"\u1F3A",
"\u1F39\u0300"=>"\u1F3B", "\u1F38\u0301"=>"\u1F3C", "\u1F39\u0301"=>"\u1F3D", "\u1F38\u0342"=>"\u1F3E", "\u1F39\u0342"=>"\u1F3F", "\u03BF\u0313"=>"\u1F40", "\u03BF\u0314"=>"\u1F41", "\u1F40\u0300"=>"\u1F42",
"\u1F41\u0300"=>"\u1F43", "\u1F40\u0301"=>"\u1F44", "\u1F41\u0301"=>"\u1F45", "\u039F\u0313"=>"\u1F48", "\u039F\u0314"=>"\u1F49", "\u1F48\u0300"=>"\u1F4A", "\u1F49\u0300"=>"\u1F4B", "\u1F48\u0301"=>"\u1F4C",
"\u1F49\u0301"=>"\u1F4D", "\u03C5\u0313"=>"\u1F50", "\u03C5\u0314"=>"\u1F51", "\u1F50\u0300"=>"\u1F52", "\u1F51\u0300"=>"\u1F53", "\u1F50\u0301"=>"\u1F54", "\u1F51\u0301"=>"\u1F55", "\u1F50\u0342"=>"\u1F56",
"\u1F51\u0342"=>"\u1F57", "\u03A5\u0314"=>"\u1F59", "\u1F59\u0300"=>"\u1F5B", "\u1F59\u0301"=>"\u1F5D", "\u1F59\u0342"=>"\u1F5F", "\u03C9\u0313"=>"\u1F60", "\u03C9\u0314"=>"\u1F61", "\u1F60\u0300"=>"\u1F62",
"\u1F61\u0300"=>"\u1F63", "\u1F60\u0301"=>"\u1F64", "\u1F61\u0301"=>"\u1F65", "\u1F60\u0342"=>"\u1F66", "\u1F61\u0342"=>"\u1F67", "\u03A9\u0313"=>"\u1F68", "\u03A9\u0314"=>"\u1F69", "\u1F68\u0300"=>"\u1F6A",
"\u1F69\u0300"=>"\u1F6B", "\u1F68\u0301"=>"\u1F6C", "\u1F69\u0301"=>"\u1F6D", "\u1F68\u0342"=>"\u1F6E", "\u1F69\u0342"=>"\u1F6F", "\u03B1\u0300"=>"\u1F70", "\u03B5\u0300"=>"\u1F72", "\u03B7\u0300"=>"\u1F74",
"\u03B9\u0300"=>"\u1F76", "\u03BF\u0300"=>"\u1F78", "\u03C5\u0300"=>"\u1F7A", "\u03C9\u0300"=>"\u1F7C", "\u1F00\u0345"=>"\u1F80", "\u1F01\u0345"=>"\u1F81", "\u1F02\u0345"=>"\u1F82", "\u1F03\u0345"=>"\u1F83",
"\u1F04\u0345"=>"\u1F84", "\u1F05\u0345"=>"\u1F85", "\u1F06\u0345"=>"\u1F86", "\u1F07\u0345"=>"\u1F87", "\u1F08\u0345"=>"\u1F88", "\u1F09\u0345"=>"\u1F89", "\u1F0A\u0345"=>"\u1F8A", "\u1F0B\u0345"=>"\u1F8B",
"\u1F0C\u0345"=>"\u1F8C", "\u1F0D\u0345"=>"\u1F8D", "\u1F0E\u0345"=>"\u1F8E", "\u1F0F\u0345"=>"\u1F8F", "\u1F20\u0345"=>"\u1F90", "\u1F21\u0345"=>"\u1F91", "\u1F22\u0345"=>"\u1F92", "\u1F23\u0345"=>"\u1F93",
"\u1F24\u0345"=>"\u1F94", "\u1F25\u0345"=>"\u1F95", "\u1F26\u0345"=>"\u1F96", "\u1F27\u0345"=>"\u1F97", "\u1F28\u0345"=>"\u1F98", "\u1F29\u0345"=>"\u1F99", "\u1F2A\u0345"=>"\u1F9A", "\u1F2B\u0345"=>"\u1F9B",
"\u1F2C\u0345"=>"\u1F9C", "\u1F2D\u0345"=>"\u1F9D", "\u1F2E\u0345"=>"\u1F9E", "\u1F2F\u0345"=>"\u1F9F", "\u1F60\u0345"=>"\u1FA0", "\u1F61\u0345"=>"\u1FA1", "\u1F62\u0345"=>"\u1FA2", "\u1F63\u0345"=>"\u1FA3",
"\u1F64\u0345"=>"\u1FA4", "\u1F65\u0345"=>"\u1FA5", "\u1F66\u0345"=>"\u1FA6", "\u1F67\u0345"=>"\u1FA7", "\u1F68\u0345"=>"\u1FA8", "\u1F69\u0345"=>"\u1FA9", "\u1F6A\u0345"=>"\u1FAA", "\u1F6B\u0345"=>"\u1FAB",
"\u1F6C\u0345"=>"\u1FAC", "\u1F6D\u0345"=>"\u1FAD", "\u1F6E\u0345"=>"\u1FAE", "\u1F6F\u0345"=>"\u1FAF", "\u03B1\u0306"=>"\u1FB0", "\u03B1\u0304"=>"\u1FB1", "\u1F70\u0345"=>"\u1FB2", "\u03B1\u0345"=>"\u1FB3",
"\u03AC\u0345"=>"\u1FB4", "\u03B1\u0342"=>"\u1FB6", "\u1FB6\u0345"=>"\u1FB7", "\u0391\u0306"=>"\u1FB8", "\u0391\u0304"=>"\u1FB9", "\u0391\u0300"=>"\u1FBA", "\u0391\u0345"=>"\u1FBC", "\u00A8\u0342"=>"\u1FC1",
"\u1F74\u0345"=>"\u1FC2", "\u03B7\u0345"=>"\u1FC3", "\u03AE\u0345"=>"\u1FC4", "\u03B7\u0342"=>"\u1FC6", "\u1FC6\u0345"=>"\u1FC7", "\u0395\u0300"=>"\u1FC8", "\u0397\u0300"=>"\u1FCA", "\u0397\u0345"=>"\u1FCC",
"\u1FBF\u0300"=>"\u1FCD", "\u1FBF\u0301"=>"\u1FCE", "\u1FBF\u0342"=>"\u1FCF", "\u03B9\u0306"=>"\u1FD0", "\u03B9\u0304"=>"\u1FD1", "\u03CA\u0300"=>"\u1FD2", "\u03B9\u0342"=>"\u1FD6", "\u03CA\u0342"=>"\u1FD7",
"\u0399\u0306"=>"\u1FD8", "\u0399\u0304"=>"\u1FD9", "\u0399\u0300"=>"\u1FDA", "\u1FFE\u0300"=>"\u1FDD", "\u1FFE\u0301"=>"\u1FDE", "\u1FFE\u0342"=>"\u1FDF", "\u03C5\u0306"=>"\u1FE0", "\u03C5\u0304"=>"\u1FE1",
"\u03CB\u0300"=>"\u1FE2", "\u03C1\u0313"=>"\u1FE4", "\u03C1\u0314"=>"\u1FE5", "\u03C5\u0342"=>"\u1FE6", "\u03CB\u0342"=>"\u1FE7", "\u03A5\u0306"=>"\u1FE8", "\u03A5\u0304"=>"\u1FE9", "\u03A5\u0300"=>"\u1FEA",
"\u03A1\u0314"=>"\u1FEC", "\u00A8\u0300"=>"\u1FED", "\u1F7C\u0345"=>"\u1FF2", "\u03C9\u0345"=>"\u1FF3", "\u03CE\u0345"=>"\u1FF4", "\u03C9\u0342"=>"\u1FF6", "\u1FF6\u0345"=>"\u1FF7", "\u039F\u0300"=>"\u1FF8",
"\u03A9\u0300"=>"\u1FFA", "\u03A9\u0345"=>"\u1FFC", "\u2190\u0338"=>"\u219A", "\u2192\u0338"=>"\u219B", "\u2194\u0338"=>"\u21AE", "\u21D0\u0338"=>"\u21CD", "\u21D4\u0338"=>"\u21CE", "\u21D2\u0338"=>"\u21CF",
"\u2203\u0338"=>"\u2204", "\u2208\u0338"=>"\u2209", "\u220B\u0338"=>"\u220C", "\u2223\u0338"=>"\u2224", "\u2225\u0338"=>"\u2226", "\u223C\u0338"=>"\u2241", "\u2243\u0338"=>"\u2244", "\u2245\u0338"=>"\u2247",
"\u2248\u0338"=>"\u2249", "=\u0338"=>"\u2260", "\u2261\u0338"=>"\u2262", "\u224D\u0338"=>"\u226D", "<\u0338"=>"\u226E", ">\u0338"=>"\u226F", "\u2264\u0338"=>"\u2270", "\u2265\u0338"=>"\u2271",
"\u2272\u0338"=>"\u2274", "\u2273\u0338"=>"\u2275", "\u2276\u0338"=>"\u2278", "\u2277\u0338"=>"\u2279", "\u227A\u0338"=>"\u2280", "\u227B\u0338"=>"\u2281", "\u2282\u0338"=>"\u2284", "\u2283\u0338"=>"\u2285",
"\u2286\u0338"=>"\u2288", "\u2287\u0338"=>"\u2289", "\u22A2\u0338"=>"\u22AC", "\u22A8\u0338"=>"\u22AD", "\u22A9\u0338"=>"\u22AE", "\u22AB\u0338"=>"\u22AF", "\u227C\u0338"=>"\u22E0", "\u227D\u0338"=>"\u22E1",
"\u2291\u0338"=>"\u22E2", "\u2292\u0338"=>"\u22E3", "\u22B2\u0338"=>"\u22EA", "\u22B3\u0338"=>"\u22EB", "\u22B4\u0338"=>"\u22EC", "\u22B5\u0338"=>"\u22ED", "\u304B\u3099"=>"\u304C", "\u304D\u3099"=>"\u304E",
"\u304F\u3099"=>"\u3050", "\u3051\u3099"=>"\u3052", "\u3053\u3099"=>"\u3054", "\u3055\u3099"=>"\u3056", "\u3057\u3099"=>"\u3058", "\u3059\u3099"=>"\u305A", "\u305B\u3099"=>"\u305C", "\u305D\u3099"=>"\u305E",
"\u305F\u3099"=>"\u3060", "\u3061\u3099"=>"\u3062", "\u3064\u3099"=>"\u3065", "\u3066\u3099"=>"\u3067", "\u3068\u3099"=>"\u3069", "\u306F\u3099"=>"\u3070", "\u306F\u309A"=>"\u3071", "\u3072\u3099"=>"\u3073",
"\u3072\u309A"=>"\u3074", "\u3075\u3099"=>"\u3076", "\u3075\u309A"=>"\u3077", "\u3078\u3099"=>"\u3079", "\u3078\u309A"=>"\u307A", "\u307B\u3099"=>"\u307C", "\u307B\u309A"=>"\u307D", "\u3046\u3099"=>"\u3094",
"\u309D\u3099"=>"\u309E", "\u30AB\u3099"=>"\u30AC", "\u30AD\u3099"=>"\u30AE", "\u30AF\u3099"=>"\u30B0", "\u30B1\u3099"=>"\u30B2", "\u30B3\u3099"=>"\u30B4", "\u30B5\u3099"=>"\u30B6", "\u30B7\u3099"=>"\u30B8",
"\u30B9\u3099"=>"\u30BA", "\u30BB\u3099"=>"\u30BC", "\u30BD\u3099"=>"\u30BE", "\u30BF\u3099"=>"\u30C0", "\u30C1\u3099"=>"\u30C2", "\u30C4\u3099"=>"\u30C5", "\u30C6\u3099"=>"\u30C7", "\u30C8\u3099"=>"\u30C9",
"\u30CF\u3099"=>"\u30D0", "\u30CF\u309A"=>"\u30D1", "\u30D2\u3099"=>"\u30D3", "\u30D2\u309A"=>"\u30D4", "\u30D5\u3099"=>"\u30D6", "\u30D5\u309A"=>"\u30D7", "\u30D8\u3099"=>"\u30D9", "\u30D8\u309A"=>"\u30DA",
"\u30DB\u3099"=>"\u30DC", "\u30DB\u309A"=>"\u30DD", "\u30A6\u3099"=>"\u30F4", "\u30EF\u3099"=>"\u30F7", "\u30F0\u3099"=>"\u30F8", "\u30F1\u3099"=>"\u30F9", "\u30F2\u3099"=>"\u30FA", "\u30FD\u3099"=>"\u30FE",
"\u{11099}\u{110BA}"=>"\u{1109A}", "\u{1109B}\u{110BA}"=>"\u{1109C}", "\u{110A5}\u{110BA}"=>"\u{110AB}", "\u{11131}\u{11127}"=>"\u{1112E}", "\u{11132}\u{11127}"=>"\u{1112F}", "\u{11347}\u{1133E}"=>"\u{1134B}", "\u{11347}\u{11357}"=>"\u{1134C}", "\u{114B9}\u{114BA}"=>"\u{114BB}",
"\u{114B9}\u{114B0}"=>"\u{114BC}", "\u{114B9}\u{114BD}"=>"\u{114BE}", "\u{115B8}\u{115AF}"=>"\u{115BA}", "\u{115B9}\u{115AF}"=>"\u{115BB}",
}.freeze
end
module UnicodeNormalize
## Constant for max hash capacity to avoid DoS attack
MAX_HASH_LENGTH = 18000 # enough for all test cases, otherwise tests get slow
## Regular Expressions and Hash Constants
REGEXP_D = Regexp.compile(REGEXP_D_STRING, Regexp::EXTENDED)
REGEXP_C = Regexp.compile(REGEXP_C_STRING, Regexp::EXTENDED)
REGEXP_K = Regexp.compile(REGEXP_K_STRING, Regexp::EXTENDED)
NF_HASH_D = Hash.new do |hash, key|
hash.shift if hash.length>MAX_HASH_LENGTH # prevent DoS attack
hash[key] = nfd_one(key)
end
NF_HASH_C = Hash.new do |hash, key|
hash.shift if hash.length>MAX_HASH_LENGTH # prevent DoS attack
hash[key] = nfc_one(key)
end
## Constants For Hangul
# for details such as the meaning of the identifiers below, please see
# http://www.unicode.org/versions/Unicode7.0.0/ch03.pdf, pp. 144/145
SBASE = 0xAC00
LBASE = 0x1100
VBASE = 0x1161
TBASE = 0x11A7
LCOUNT = 19
VCOUNT = 21
TCOUNT = 28
NCOUNT = VCOUNT * TCOUNT
SCOUNT = LCOUNT * NCOUNT
# Unicode-based encodings (except UTF-8)
UNICODE_ENCODINGS = [Encoding::UTF_16BE, Encoding::UTF_16LE, Encoding::UTF_32BE, Encoding::UTF_32LE,
Encoding::GB18030, Encoding::UCS_2BE, Encoding::UCS_4BE]
## Hangul Algorithm
def self.hangul_decomp_one(target)
syllable_index = target.ord - SBASE
return target if syllable_index < 0 || syllable_index >= SCOUNT
l = LBASE + syllable_index / NCOUNT
v = VBASE + (syllable_index % NCOUNT) / TCOUNT
t = TBASE + syllable_index % TCOUNT
(t==TBASE ? [l, v] : [l, v, t]).pack('U*') + target[1..-1]
end
def self.hangul_comp_one(string)
length = string.length
if length>1 and 0 <= (lead =string[0].ord-LBASE) and lead < LCOUNT and
0 <= (vowel=string[1].ord-VBASE) and vowel < VCOUNT
lead_vowel = SBASE + (lead * VCOUNT + vowel) * TCOUNT
if length>2 and 0 <= (trail=string[2].ord-TBASE) and trail < TCOUNT
(lead_vowel + trail).chr(Encoding::UTF_8) + string[3..-1]
else
lead_vowel.chr(Encoding::UTF_8) + string[2..-1]
end
else
string
end
end
## Canonical Ordering
def self.canonical_ordering_one(string)
sorting = string.each_char.collect { |c| [c, CLASS_TABLE[c]] }
(sorting.length-2).downto(0) do |i| # almost, but not exactly bubble sort
(0..i).each do |j|
later_class = sorting[j+1].last
if 0