When we install Rails, we get this rails"executable":
require 'rubygems'
version = ">= 0"
if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
version = $1
ARGV.shift
end
end
gem 'railties', version
load Gem.bin_path('railties', 'rails', version)
I wonder what it means to do force_encoding("BINARY")on this Line. What are the possible values ββfor what is force_encodingneeded? I would have thought that people would only indicate versions using numbers and letters here.
source
share