b22a24a715
From release announce: Ruby 2.3.0 Released Posted by naruse on 25 Dec 2015 We are pleased to announce the release of Ruby 2.3.0. This is the first stable release of Ruby 2.3 series. It introduces many new features for example: A Frozen String Literal Pragma is introduced. With Ruby 2.1, "str".freeze has been optimized to reduce object allocation. Ruby 2.3 introduces a new magic comment and command line option to freeze all string literals in the source files. Additionally for debugging, you can get where the object is created on "can't modify frozen String" error by --debug=frozen-string-literal command line option. A safe navigation operator (so-called lonely operator) &., which already exists in C#, Groovy, and Swift, is introduced to ease nil handling as obj&.foo. Array#dig and Hash#dig are also added. Note that this behaves as try! of Active Support, which specially handle only nil. The did_you_mean gem is bundled. The did_you_mean gem shows the candidates on the NameError and NoMethodError to ease debugging. RubyVM::InstructionSequence#to_binary and .load_from_binary are introduced as experimental feature. With these features, we can make a ISeq (bytecode) pre-compilation system. It also includes many performance improvements for example, reconsider method entry data structure, introducing new table data structure, optimize Proc#call, machine code level tuning for object allocation and method calling code, smarter instance variable data structure, Socket and I/O allow to use “exception:” keywords for high-performance non-blocking I/O and so on. Check “Implementation improvements” section in NEWS file. For a complete list of new features and compatibility notes, please see NEWS and ChangeLog.
41 lines
1.9 KiB
Ruby
41 lines
1.9 KiB
Ruby
$NetBSD: patch-lib_rubygems_installer.rb,v 1.1 2015/12/30 14:59:42 taca Exp $
|
|
|
|
* Add install_root option for pkgsrc's rubygems support.
|
|
* Tweak build_info directory with destdir to store build_args.
|
|
|
|
--- lib/rubygems/installer.rb.orig 2015-12-16 05:07:31.000000000 +0000
|
|
+++ lib/rubygems/installer.rb
|
|
@@ -149,6 +149,9 @@ class Gem::Installer
|
|
# foo_exec18.
|
|
# :ignore_dependencies:: Don't raise if a dependency is missing.
|
|
# :install_dir:: The directory to install the gem into.
|
|
+ # :install_root:: The directory to use as a buildroot for "destdir"-style
|
|
+ # installation. All paths during installation are relative
|
|
+ # to the buildroot.
|
|
# :security_policy:: Use the specified security policy. See Gem::Security
|
|
# :user_install:: Indicate that the gem should be unpacked into the users
|
|
# personal gem directory.
|
|
@@ -642,7 +645,12 @@ class Gem::Installer
|
|
# If the user has asked for the gem to be installed in a directory that is
|
|
# the system gem directory, then use the system bin directory, else create
|
|
# (or use) a new bin dir under the gem_home.
|
|
- @bin_dir = options[:bin_dir] || Gem.bindir(gem_home)
|
|
+ install_root = options[:install_root]
|
|
+ @bin_dir = options[:bin_dir] || Gem.bindir(gem_home, install_root)
|
|
+ unless install_root.nil? or install_root.empty?
|
|
+ @install_root = File.expand_path install_root
|
|
+ @gem_home = File.join(@install_root, @gem_home)
|
|
+ end
|
|
@development = options[:development]
|
|
@build_root = options[:build_root]
|
|
|
|
@@ -829,6 +837,9 @@ TEXT
|
|
return if @build_args.empty?
|
|
|
|
build_info_dir = File.join gem_home, 'build_info'
|
|
+ unless @install_root.nil? or @install_root.empty?
|
|
+ build_info_dir = File.join @gem_home, "build_info"
|
|
+ end
|
|
|
|
FileUtils.mkdir_p build_info_dir
|
|
|