Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8f231184d7a1
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 33604d2ba03c
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Jan 4, 2016

  1. Switched to rbx-2.2.mspec.

    brixen committed Jan 4, 2016
    Copy the full SHA
    44b60e9 View commit details
  2. Copy the full SHA
    33604d2 View commit details
Showing with 35 additions and 0 deletions.
  1. +7 −0 kernel/delta/deprecations.rb
  2. +1 −0 kernel/delta/load_order.txt
  3. +27 −0 kernel/loader.rb
  4. 0 spec/{rbx.2.1.mspec → rbx.2.2.mspec}
7 changes: 7 additions & 0 deletions kernel/delta/deprecations.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module Rubinius
DEPRECATIONS = {
# "Description" => "Alternative"
"Ruby 2.1 features that are incompatible with Ruby 2.2 are deprecated." =>
"Use Ruby 2.2 features if they are available."
}
end
1 change: 1 addition & 0 deletions kernel/delta/load_order.txt
Original file line number Diff line number Diff line change
@@ -20,3 +20,4 @@ ffi.rbc
ruby_constants.rbc
pack.rbc
metrics.rbc
deprecations.rbc
27 changes: 27 additions & 0 deletions kernel/loader.rb
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ def initialize
@load_profiler = false
@enable_gems = true
@load_gemfile = false
@deprecations = false

version = RUBY_VERSION.split(".").first(2).join(".")
@gem_bins = ["#{version}/bin", "bin"].map do |dir|
@@ -394,6 +395,10 @@ def options(argv=ARGV)
end
end

options.on "--deprecated", "Display any deprecations" do
@deprecations = true
end

options.on "--version", "Display the version" do
@repl = false
puts Rubinius.version
@@ -531,6 +536,27 @@ def load_paths
end
end

def deprecations
@stage = "showing deprecations"

return unless @deprecations

if Rubinius::DEPRECATIONS.size > 0
Rubinius::DEPRECATIONS.each do |desc, alt|
STDERR.puts <<-EOM
Deprecation: #{desc}
Alternative: #{alt}
EOM
end

exit 1
else
STDERR.puts "Rubinius #{Rubinius::VERSION} has no deprecation notices"
exit 0
end
end

def run_compiled
return unless ENV["RBX_RUN_COMPILED"]

@@ -833,6 +859,7 @@ def main
detect_alias
options
load_paths
deprecations
rubygems
gemfile
debugger
File renamed without changes.