Skip to content
Permalink
Browse files
Merge remote-tracking branch 'origin' into mcjit
  • Loading branch information
brixen committed Jan 8, 2016
2 parents 3f58238 + da81b5d commit bab0934e3aeb1736efae8f22ebe0f75de2e4b1f1
Showing with 2,054 additions and 407 deletions.
  1. +1 −1 .travis.yml
  2. +27 −0 BSD_LICENSE
  3. +1 −1 Gemfile.installed
  4. +364 −25 LICENSE
  5. +6 −5 README
  6. +6 −5 README.md
  7. +89 −7 configure
  8. +8 −0 dockerfiles/ubuntu/14.04/Dockerfile
  9. +8 −0 dockerfiles/ubuntu/15.10/Dockerfile
  10. +3 −3 gems_list.txt
  11. +5 −0 kernel/bootstrap/stat.rb
  12. +6 −2 kernel/common/binding.rb
  13. +5 −0 kernel/common/dir.rb
  14. +218 −142 kernel/common/enumerable.rb
  15. +2 −22 kernel/common/eval.rb
  16. +3 −0 kernel/common/exception.rb
  17. +83 −51 kernel/common/file.rb
  18. +28 −0 kernel/common/float.rb
  19. +34 −0 kernel/common/method.rb
  20. +1 −2 kernel/common/process_mirror.rb
  21. +1 −1 kernel/common/throw_catch.rb
  22. +26 −0 kernel/common/variable_scope.rb
  23. +7 −0 kernel/delta/deprecations.rb
  24. +1 −0 kernel/delta/load_order.txt
  25. +27 −0 kernel/loader.rb
  26. +1 −0 rakelib/gems.rake
  27. +1 −0 rakelib/preinstall_gems.rb
  28. +1 −1 rakelib/release.rb
  29. +1 −1 scripts/configuration.sh
  30. +72 −15 scripts/deploy.sh
  31. +67 −7 scripts/tag.sh
  32. 0 spec/{rbx.2.1.mspec → rbx.2.2.mspec}
  33. +29 −0 spec/ruby/core/binding/local_variables_spec.rb
  34. +11 −0 spec/ruby/core/binding/receiver_spec.rb
  35. +16 −19 spec/ruby/core/dir/fileno_spec.rb
  36. +1 −1 spec/ruby/core/enumerable/each_cons_spec.rb
  37. +1 −1 spec/ruby/core/enumerable/each_entry_spec.rb
  38. +1 −1 spec/ruby/core/enumerable/each_slice_spec.rb
  39. +38 −0 spec/ruby/core/enumerable/max_by_spec.rb
  40. +48 −15 spec/ruby/core/enumerable/max_spec.rb
  41. +40 −3 spec/ruby/core/enumerable/min_by_spec.rb
  42. +34 −2 spec/ruby/core/enumerable/min_spec.rb
  43. +53 −0 spec/ruby/core/enumerable/slice_after_spec.rb
  44. +1 −1 spec/ruby/core/enumerable/slice_before_spec.rb
  45. +36 −0 spec/ruby/core/enumerable/slice_when_spec.rb
  46. +56 −0 spec/ruby/core/file/birthtime_spec.rb
  47. +1 −1 spec/ruby/core/file/ctime_spec.rb
  48. +18 −0 spec/ruby/core/file/stat/birthtime_spec.rb
  49. +28 −2 spec/ruby/core/file/utime_spec.rb
  50. +44 −0 spec/ruby/core/float/next_float_spec.rb
  51. +44 −0 spec/ruby/core/float/prev_float_spec.rb
  52. +4 −4 spec/ruby/core/kernel/catch_spec.rb
  53. +18 −0 spec/ruby/core/kernel/frozen_spec.rb
  54. +4 −6 spec/ruby/core/kernel/itself_spec.rb
  55. +2 −2 spec/ruby/core/kernel/throw_spec.rb
  56. +38 −0 spec/ruby/core/method/curry_spec.rb
  57. +12 −0 spec/ruby/core/method/fixtures/classes.rb
  58. +39 −0 spec/ruby/core/method/super_method_spec.rb
  59. +1 −0 spec/ruby/core/proc/curry_spec.rb
  60. +103 −0 spec/ruby/core/string/unicode_normalize_spec.rb
  61. +3 −0 spec/ruby/core/unboundmethod/fixtures/classes.rb
  62. +26 −0 spec/ruby/core/unboundmethod/super_method_spec.rb
  63. +17 −0 spec/ruby/language/block_spec.rb
  64. +12 −1 spec/ruby/language/def_spec.rb
  65. +7 −7 spec/ruby/language/hash_spec.rb
  66. +17 −0 spec/ruby/language/lambda_spec.rb
  67. +0 −1 spec/ruby/language/regexp/character_classes_spec.rb
  68. +6 −6 spec/ruby/language/throw_spec.rb
  69. +8 −8 spec/ruby/optional/capi/kernel_spec.rb
  70. +21 −13 spec/ruby/shared/process/spawn.rb
  71. +1 −0 spec/tags/ruby/core/file/stat/birthtime_tags.txt
  72. +0 −10 spec/tags/ruby/core/io/popen_tags.txt
  73. +3 −0 spec/tags/ruby/core/kernel/frozen_tags.txt
  74. +1 −0 spec/tags/ruby/core/method/curry_tags.txt
  75. +1 −0 spec/tags/ruby/core/proc/curry_tags.txt
  76. +14 −0 spec/tags/ruby/core/string/unicode_normalize_tags.txt
  77. +2 −0 spec/tags/ruby/language/block_tags.txt
  78. +1 −0 spec/tags/ruby/language/def_tags.txt
  79. +4 −0 spec/tags/ruby/language/hash_tags.txt
  80. +2 −0 spec/tags/ruby/language/lambda_tags.txt
  81. +2 −2 vm/builtin/access_variable.cpp
  82. +6 −0 vm/builtin/dir.cpp
  83. +3 −0 vm/builtin/dir.hpp
  84. +10 −3 vm/builtin/object.cpp
  85. +7 −0 vm/builtin/object.hpp
  86. +36 −3 vm/builtin/stat.cpp
  87. +3 −0 vm/builtin/stat.hpp
  88. +11 −1 vm/ffi_util.cpp
  89. +1 −1 vm/instructions.def
  90. +5 −2 vm/oop.hpp
@@ -17,7 +17,7 @@ before_script:
- if [ $TRAVIS_OS_NAME == osx ]; then travis_retry ./configure; fi
script: rake ci
after_success:
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh; fi
- if [ $TRAVIS_BRANCH == $TRAVIS_TAG ]; then ./scripts/deploy.sh all; fi
branches:
only:
- master
@@ -0,0 +1,27 @@
BSD 3-clause License

Copyright (c) 2007-2015, Evan Phoenix and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Rubinius nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -15,7 +15,7 @@ gem "racc", "~> 1.4"
gem "rake", "~> 10.1"
gem "json", "~> 1.8"
gem "rdoc", "~> 4.0"
gem "psych", "= 2.0.13"
gem "psych", "= 2.0.17"

gem "rb-readline", "~> 0.5"
gem "rubysl-readline", "~> 2.0"
389 LICENSE

Large diffs are not rendered by default.

11 README
@@ -35,8 +35,9 @@ The following Ruby features are not supported on Rubinius:

3. License

Rubinius uses the BSD license. See LICENSE for details.

Rubinius uses the MPL-2.0 license. See LICENSE for details. Contributions made
prior to January 3rd, 2016 are licensed under the old BSD 3-clause license. A
copy of this license can be found in the file "BSD_LICENSE".

4. Installing Rubinius from Source

@@ -51,8 +52,8 @@ To install Rubinius, use the following steps:

When the install process finishes, follow the directions printed to the
terminal to add the Rubinius executable (bin) directory to your PATH. For more
information see http://rubini.us/doc/en/getting-started/requirements/
and http://rubini.us/doc/en/getting-started/building/.
information see http://rubinius.com/doc/en/getting-started/requirements/
and http://rubinius.com/doc/en/getting-started/building/.


5. Using RubyGems
@@ -66,7 +67,7 @@ Rubinius comes with RubyGems built-in. To install a gem, run the following:

The Rubinius documentation is available at the Rubinius website:

http://rubini.us
http://rubinius.com


7. Issues & Support
@@ -33,8 +33,9 @@ The following Ruby features are not supported on Rubinius:

### License

Rubinius uses the BSD license. See LICENSE for details.

Rubinius uses the MPL-2.0 license. See LICENSE for details. Contributions made
prior to January 3rd, 2016 are licensed under the old BSD 3-clause license. A
copy of this license can be found in the file "BSD_LICENSE".

### Installing Rubinius from Source

@@ -47,7 +48,7 @@ To install Rubinius, use the following steps:
1. ./configure --prefix=/path/to/install/dir
1. rake

When the install process finishes, follow the directions printed to the terminal to add the Rubinius executable (bin) directory to your PATH. For more information see the documentation for [Build Requirements](http://rubini.us/doc/en/getting-started/requirements/) and [Building Rubinius](http://rubini.us/doc/en/getting-started/building/).
When the install process finishes, follow the directions printed to the terminal to add the Rubinius executable (bin) directory to your PATH. For more information see the documentation for [Build Requirements](http://rubinius.com/doc/en/getting-started/requirements/) and [Building Rubinius](http://rubinius.com/doc/en/getting-started/building/).


### Using RubyGems
@@ -59,7 +60,7 @@ Rubinius comes with RubyGems built-in. To install a gem, run the following:

### Documentation

The Rubinius documentation is available at the [Rubinius website](http://rubini.us).
The Rubinius documentation is available at the [Rubinius website](http://rubinius.com).


### Issues & Support
@@ -72,4 +73,4 @@ For additional help, visit the [Rubinius Gitter chat room](https://gitter.im/rub
### Contributing

The Rubinius team welcomes contributions. For more information, read the
[CONTRIBUTING](https://github.com/rubinius/rubinius/blob/master/CONTRIBUTING.md) file and see the documentation [about contributing](http://rubini.us/doc/en/contributing/).
[CONTRIBUTING](https://github.com/rubinius/rubinius/blob/master/CONTRIBUTING.md) file and see the documentation [about contributing](http://rubinius.com/doc/en/contributing/).
@@ -161,7 +161,7 @@ class Configure
@vendored_libdir = File.join(root, "/vendor")

# Ruby compatibility version
@ruby_version = "2.1.0"
@ruby_version = "2.2.0"
@ruby_libversion = @ruby_version.split(/\./)[0..1].join.to_i

# Configure settings
@@ -276,6 +276,11 @@ class Configure
@runtime_gems_dir ||= "#{@build_prefix}#{@runtimedir}/gems"
end

def add_opt_dir(dir)
@include_dirs << "#{dir}/include"
@lib_dirs << "#{dir}/lib" << "#{dir}/lib64"
end

def options
@options = Rubinius::Options.new "Usage: configure [options]", 30
o = @options
@@ -361,8 +366,7 @@ class Configure

o.on "--with-opt-dir", "DIR", "Add DIR/include and DIR/lib to include and library search paths" do |dir|
dir.split(File::PATH_SEPARATOR).each do |d|
@include_dirs << "#{d}/include"
@lib_dirs << "#{d}/lib" << "#{d}/lib64"
add_opt_dir(d)
end
end

@@ -701,6 +705,14 @@ int main() { LLVMContext &Context = getGlobalContext(); }
check_tool_version @cc, '-dumpversion', [4, 1]
check_tool_version @cxx, '-dumpversion', [4, 1]

unless @cc == "clang" and @cxx == "clang++"
@log.deprecated <<-EOM
Support for compilers other than clang/clang++ is deprecated and will be
removed soon. If your platform does not have support for clang/clang++,
please notify us.
EOM
end

@make ||= ENV['MAKE'] || 'make'
@rake ||= ENV['RAKE'] || 'rake'
@tar ||= ENV['TAR'] || (@windows ? 'bsdtar' : 'tar')
@@ -1018,8 +1030,7 @@ int main() { return tgetnum(""); }

def detect_build_dirs
["/usr/local", "/opt/local", "/usr/pkg"].each do |dir|
@include_dirs << "#{dir}/include"
@lib_dirs << "#{dir}/lib" << "#{dir}/lib64"
add_opt_dir(dir)
end

@include_dirs = @include_dirs.select {|p| File.directory? p }
@@ -1156,7 +1167,7 @@ int main() { return tgetnum(""); }

def detect_features
# Default on *BSD is no execinfo
if RUBY_PLATFORM =~ /bsd/i and @features["execinfo"].configured.nil?
if @bsd and @features["execinfo"].configured.nil?
@features["execinfo"].configured = false
end

@@ -1221,6 +1232,46 @@ int main() { return tgetnum(""); }
@defines << "HAVE_GETTID"
end

if has_struct_member("stat", "st_atim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIM"
end

if has_struct_member("stat", "st_atimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIMESPEC"
end

if has_struct_member("stat", "st_atimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_ATIMENSEC"
end

if has_struct_member("stat", "st_mtim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIM"
end

if has_struct_member("stat", "st_mtimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIMESPEC"
end

if has_struct_member("stat", "st_mtimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_MTIMENSEC"
end

if has_struct_member("stat", "st_ctim", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIM"
end

if has_struct_member("stat", "st_ctimespec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIMESPEC"
end

if has_struct_member("stat", "st_ctimensec", ["sys/stat.h"])
@defines << "HAVE_STRUCT_STAT_ST_CTIMENSEC"
end

if has_struct_member("stat", "st_birthtimespec", ["sys/stat.h"])
@defines << "HAVE_ST_BIRTHTIME"
end

# glibc has useless lchmod() so we don't try to use lchmod() on linux
if !@linux and has_function("lchmod", ["sys/stat.h", "unistd.h"])
@have_lchmod = true
@@ -1348,7 +1399,6 @@ int main() { return tgetnum(""); }
end

def process
set_host
set_system_commands

enable_features
@@ -1796,7 +1846,9 @@ int main() { return tgetnum(""); }
end

options
set_host
parse ARGV
detect_homebrew_openssl_lib
create_directories
check_tools
check_force_clean
@@ -1958,6 +2010,21 @@ Available commands are:
STDERR.puts message
end

DEPRECATION_HEADER =
"------------------------------ Deprecation notice ------------------------------"
DEPRECATION_FOOTER =
"--------------------------------------------------------------------------------"

def deprecated(message)
log DEPRECATION_HEADER, true
log message, true
log DEPRECATION_FOOTER, true

STDERR.puts DEPRECATION_HEADER
STDERR.puts message
STDERR.puts DEPRECATION_FOOTER
end

# Yields an IO for writing log messages.
def output
File.open @path, "a" do |f|
@@ -1995,6 +2062,21 @@ Available commands are:
fgrep llvm-config`.split
avail_binaries.reject { |fname| fname.include? 'libexec' }.last
end

# Returns true if the *brew* command is in the PATH and identifies
# itself with "Homebrew" when run interactively with -v argument.
def homebrew?
`echo quit | brew -v 2>&-`.start_with? 'Homebrew'
end

# Check if latest version of openssl is installed; if so, add to include
# and libs
def detect_homebrew_openssl_lib
if @darwin && homebrew? && (`brew list`.split("\n").include? 'openssl')
add_opt_dir(`brew --prefix openssl`.chomp)
end
end

end

STDOUT.sync = true
@@ -0,0 +1,8 @@
FROM ubuntu:14.04

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/14.04/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
@@ -0,0 +1,8 @@
FROM ubuntu:15.10

ADD https://rubinius-binaries-rubinius-com.s3-us-west-2.amazonaws.com/ubuntu/15.10/x86_64/rubinius-3.3.tar.bz2 /tmp/rubinius.tar.bz2
RUN apt-get -y install bzip2 && cd /opt && tar xvjf /tmp/rubinius.tar.bz2

ENV PATH /opt/rubinius/3.3/bin:/opt/rubinius/3.3/gems/bin:$PATH

CMD ["bash"]
@@ -3,7 +3,7 @@ daedalus-core-0.5.0.gem
ffi2-generators-0.1.1.gem
json-1.8.3.gem
minitest-4.7.5.gem
psych-2.0.13.gem
psych-2.0.17.gem
racc-1.4.14.gem
rake-10.4.2.gem
rb-readline-0.5.3.gem
@@ -72,7 +72,7 @@ rubysl-nkf-2.0.1.gem
rubysl-observer-2.0.0.gem
rubysl-open-uri-2.0.0.gem
rubysl-open3-2.0.0.gem
rubysl-openssl-2.7.0.gem
rubysl-openssl-2.8.0.gem
rubysl-optparse-2.0.1.gem
rubysl-ostruct-2.1.0.gem
rubysl-pathname-2.1.0.gem
@@ -93,7 +93,7 @@ rubysl-securerandom-2.0.0.gem
rubysl-set-2.0.1.gem
rubysl-shellwords-2.0.0.gem
rubysl-singleton-2.0.0.gem
rubysl-socket-2.0.1.gem
rubysl-socket-2.1.0.gem
rubysl-stringio-2.0.0.gem
rubysl-strscan-2.0.0.gem
rubysl-sync-2.0.0.gem
@@ -87,6 +87,11 @@ def ctime
raise PrimitiveFailure, "Rubinius::Stat#ctime primitive failed"
end

def birthtime
Rubinius.primitive :stat_birthtime
raise NotImplementedError, "birthtime() function is unimplemented on this machine"
end

def inspect
"#<#{self.class.name} dev=0x#{self.dev.to_s(16)}, ino=#{self.ino}, " \
"mode=#{sprintf("%07d", self.mode.to_s(8).to_i)}, nlink=#{self.nlink}, " \
@@ -3,8 +3,8 @@ class Binding
attr_accessor :compiled_code
attr_accessor :constant_scope
attr_accessor :proc_environment
attr_accessor :self
attr_accessor :location
attr_accessor :receiver

def from_proc?
@proc_environment
@@ -29,7 +29,7 @@ def self.self_context(recv, variables)
def self.setup(variables, code, constant_scope, recv=nil, location=nil)
bind = allocate()

bind.self = self_context(recv, variables)
bind.receiver = self_context(recv, variables)
bind.variables = variables
bind.compiled_code = code
bind.constant_scope = constant_scope
@@ -54,4 +54,8 @@ def eval(expr, filename=nil, lineno=nil)

Kernel.eval(expr, self, filename, lineno)
end

def local_variables
variables.local_variables
end
end
@@ -174,6 +174,11 @@ def each
self
end

def fileno
Rubinius.primitive :dir_fileno
raise PrimitiveFailure, "Dir#fileno primitive failed"
end

attr_reader :path

alias_method :to_path, :path
Loading

0 comments on commit bab0934

Please sign in to comment.