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: 87f45ab4853c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 446a6c7b7523
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 27, 2016

  1. Copy the full SHA
    a721735 View commit details
  2. Merge pull request #3830 from lucasallan/bignum-bit_length

    Adds method #bit_length to Bignum
    kares committed Apr 27, 2016
    Copy the full SHA
    446a6c7 View commit details
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/src/main/java/org/jruby/RubyBignum.java
5 changes: 5 additions & 0 deletions core/src/main/java/org/jruby/RubyBignum.java
Original file line number Diff line number Diff line change
@@ -666,6 +666,11 @@ public IRubyObject op_or(ThreadContext context, IRubyObject other) {
return coerceBit(context, "|", other);
}

@JRubyMethod
public IRubyObject bit_length(ThreadContext context) {
return context.runtime.newFixnum(value.bitLength());
}

public IRubyObject op_or19(ThreadContext context, IRubyObject other) {
return op_or(context, other);
}