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: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ac4fea1e1773
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 626d8626f6a3
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 3, 2015

  1. Copy the full SHA
    b6643d0 View commit details
  2. Merge pull request #2642 from bjfish/truffle_sybmod_succ_refactor

    [Truffle] Refactored Symbol#succ to use ruby version.
    chrisseaton committed Mar 3, 2015
    Copy the full SHA
    626d862 View commit details
3 changes: 0 additions & 3 deletions spec/truffle/tags/core/symbol/next_tags.txt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -340,25 +340,6 @@ public int size(RubySymbol symbol) {

}

@CoreMethod(names = {"succ"})
public abstract static class SuccNode extends CoreMethodNode {

public SuccNode(RubyContext context, SourceSection sourceSection) {
super(context, sourceSection);
}

public SuccNode(SuccNode prev) {
super(prev);
}

@Specialization
public RubySymbol succ(RubySymbol symbol) {
notDesignedForCompilation();
return getContext().newSymbol(StringSupport.succCommon(symbol.getByteList()));
}

}

@CoreMethod(names = { "swapcase"})
public abstract static class SwapcaseNode extends CoreMethodNode {

1 change: 1 addition & 0 deletions truffle/src/main/ruby/core.rb
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@
require_relative 'core/rubinius/common/proc'
require_relative 'core/rubinius/common/string'
require_relative 'core/rubinius/common/struct'
require_relative 'core/rubinius/common/symbol'
require_relative 'core/rubinius/common/regexp'
require_relative 'core/rubinius/common/signal'
require_relative 'core/rubinius/common/mutex'
35 changes: 35 additions & 0 deletions truffle/src/main/ruby/core/rubinius/common/symbol.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (c) 2007-2014, 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.

class Symbol

def succ
to_s.succ.to_sym
end

alias_method :next, :succ

end