Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
282 additions
and 196 deletions.
- +11 −6 core/src/main/java/org/jruby/ext/bigdecimal/RubyBigDecimal.java
- +88 −3 core/src/main/java/org/jruby/runtime/Signature.java
- +36 −8 core/src/main/java/org/jruby/util/io/Sockaddr.java
- +1 −1 core/src/main/ruby/jruby/truffle/core.rb
- +0 −33 core/src/main/ruby/jruby/truffle/core/rubinius/api/shims/enumerator.rb
- +5 −1 core/src/main/ruby/jruby/truffle/core/rubinius/api/shims/rubinius.rb
- +2 −0 core/src/main/ruby/jruby/truffle/core/rubinius/kernel/common/array.rb
- +35 −0 core/src/main/ruby/jruby/truffle/core/rubinius/kernel/common/exception.rb
- +12 −0 spec/regression/GH-2524_bigdecimal_loss_of_precision_with_different_excution_order_spec.rb
- +0 −1 spec/truffle/tags/core/enumerable/chunk_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/collect_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/detect_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/drop_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/drop_while_tags.txt
- +0 −3 spec/truffle/tags/core/enumerable/each_cons_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/each_entry_tags.txt
- +0 −3 spec/truffle/tags/core/enumerable/each_slice_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/each_with_index_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/each_with_object_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/entries_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/find_tags.txt
- +0 −5 spec/truffle/tags/core/enumerable/group_by_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/inject_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/lazy_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/map_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/reduce_tags.txt
- +0 −1 spec/truffle/tags/core/enumerable/sort_by_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/sort_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/take_while_tags.txt
- +0 −2 spec/truffle/tags/core/enumerable/to_a_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/collect_concat_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/collect_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/drop_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/drop_while_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/enum_for_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/find_all_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/flat_map_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/grep_tags.txt
- +0 −7 spec/truffle/tags/core/enumerator/lazy/initialize_tags.txt
- +0 −1 spec/truffle/tags/core/enumerator/lazy/lazy_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/map_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/reject_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/select_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/take_tags.txt
- +0 −4 spec/truffle/tags/core/enumerator/lazy/take_while_tags.txt
- +0 −3 spec/truffle/tags/core/enumerator/lazy/to_enum_tags.txt
- +0 −5 spec/truffle/tags/core/enumerator/lazy/zip_tags.txt
- +14 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/ArrayNodes.java
- +1 −1 truffle/src/main/java/org/jruby/truffle/nodes/core/HashNodes.java
- +8 −12 truffle/src/main/java/org/jruby/truffle/nodes/core/KernelNodes.java
- +9 −9 truffle/src/main/java/org/jruby/truffle/nodes/core/RegexpNodes.java
- +11 −0 truffle/src/main/java/org/jruby/truffle/runtime/core/CoreLibrary.java
- +6 −7 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyFiber.java
- +0 −4 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyRegexp.java
- +11 −11 truffle/src/main/java/org/jruby/truffle/runtime/core/RubyThread.java
- +32 −0 truffle/src/main/java/org/jruby/truffle/translator/BodyTranslator.java
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -12,10 +12,14 @@ def self.mathn_loaded? | ||
false | ||
end | ||
|
||
class Fiber < ::Fiber | ||
|
||
ENABLED = true | ||
|
||
def initialize(size, &block) | ||
super &block | ||
end | ||
|
||
end | ||
|
||
end | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -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. | ||
|
||
# Only part of Rubinius' exception.rb | ||
|
||
class StopIteration < IndexError | ||
end | ||
|
||
class StopIteration | ||
attr_accessor :result | ||
private :result= | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,12 @@ | ||
require 'bigdecimal' | ||
|
||
# https://github.com/jruby/jruby/issues/2524 | ||
describe 'BigDecimal precision test with different execution order' do | ||
it 'returns same precision ' do | ||
fraction = BigDecimal.new("0.0095") / 365 * BigDecimal.new(50_000) | ||
r1 = fraction * BigDecimal.new(50_000) / BigDecimal.new(100_000) | ||
r2 = fraction * (BigDecimal.new(50_000) / BigDecimal.new(100_000)) | ||
expect(r1).to eq(r2) | ||
end | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,2 +1 @@ | ||
fails:Enumerable#collect passes through the values yielded by #each_with_index | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1 @@ | ||
fails:Enumerable#detect passes through the values yielded by #each_with_index | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1,2 @@ | ||
fails:Enumerable#drop passed a number n as an argument returns [] for empty enumerables | ||
fails:Enumerable#drop passed a number n as an argument returns [] if dropping all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1 @@ | ||
fails:Enumerable#drop_while will only go through what's needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,5 +1,2 @@ | ||
fails:Enumerable#each_cons tries to convert n to an Integer using #to_int | ||
fails:Enumerable#each_cons yields only as much as needed | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,3 +1 @@ | ||
fails:Enumerable#each_entry passes through the values yielded by #each_with_index | ||
Oops, something went wrong.