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: 54efdcd10933
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fa11d875fe10
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 24, 2016

  1. Copy the full SHA
    b2e01e3 View commit details
  2. Copy the full SHA
    02600cb View commit details
  3. Copy the full SHA
    fa11d87 View commit details
Showing with 8 additions and 0 deletions.
  1. +7 −0 test/truffle/compiler/pe/core/string_pe.rb
  2. +1 −0 truffle/src/main/java/org/jruby/truffle/core/rubinius/StringPrimitiveNodes.java
7 changes: 7 additions & 0 deletions test/truffle/compiler/pe/core/string_pe.rb
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@

example "'A' == String.from_codepoint(65, Encoding::US_ASCII)", true
example "'A' == 65.chr", true
example "'A'.ord == 65", true

example "'aba'[0] == 'aca'[-1]", true

@@ -42,3 +43,9 @@
example "''.empty?", true
example "'abc'.empty?", false
example "'こにちわ'.empty?", false

example "x = 'abc'; y = 'xyz'; x.replace(y) == y", true

example "'abc'.getbyte(0) == 97", true
example "'abc'.getbyte(-1) == 99", true
example "'abc'.getbyte(10_000) == nil", true
Original file line number Diff line number Diff line change
@@ -497,6 +497,7 @@ public int stringCompareSubstring(VirtualFrame frame, DynamicObject string, Dyna
}

@RubiniusPrimitive(name = "string_equal", needsSelf = true)
@ImportStatic(StringGuards.class)
public static abstract class StringEqualPrimitiveNode extends RubiniusPrimitiveArrayArgumentsNode {

public StringEqualPrimitiveNode(RubyContext context, SourceSection sourceSection) {