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

Commits on Jul 11, 2017

  1. Copy the full SHA
    4d1db6f View commit details
  2. Merge pull request #4713 from MSNexploder/set_encoding

    IO#set_encoding should return self (fixes #4712)
    enebo authored Jul 11, 2017
    Copy the full SHA
    9f46ea7 View commit details
Showing with 3 additions and 4 deletions.
  1. +3 −3 core/src/main/java/org/jruby/RubyIO.java
  2. +0 −1 spec/tags/ruby/core/io/set_encoding_tags.txt
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/RubyIO.java
Original file line number Diff line number Diff line change
@@ -1058,7 +1058,7 @@ public IRubyObject internal_encoding(ThreadContext context) {
public IRubyObject set_encoding(ThreadContext context, IRubyObject encodingObj) {
setEncoding(context, encodingObj, context.nil, context.nil);

return context.nil;
return this;
}

@JRubyMethod
@@ -1070,14 +1070,14 @@ public IRubyObject set_encoding(ThreadContext context, IRubyObject encodingStrin
setEncoding(context, encodingString, internalEncoding, context.nil);
}

return context.nil;
return this;
}

@JRubyMethod
public IRubyObject set_encoding(ThreadContext context, IRubyObject encodingString, IRubyObject internalEncoding, IRubyObject options) {
setEncoding(context, encodingString, internalEncoding, options);

return context.nil;
return this;
}

// mri: io_encoding_set
1 change: 0 additions & 1 deletion spec/tags/ruby/core/io/set_encoding_tags.txt

This file was deleted.