Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,10 @@ axes:
display_name: ruby-2.7
variables:
RVM_RUBY: ruby-2.7
- id: jruby-10.1
display_name: jruby-10.1
variables:
RVM_RUBY: jruby-10.1
- id: jruby-10.0
display_name: jruby-10.0
variables:
Expand Down Expand Up @@ -410,7 +414,7 @@ buildvariants:
- name: "test"

- matrix_name: "jruby"
matrix_spec: { ruby: ["jruby-10.0", "jruby-9.4", "jruby-9.3"], all-os: ubuntu2404 }
matrix_spec: { ruby: ["jruby-10.1", "jruby-10.0", "jruby-9.4", "jruby-9.3"], all-os: ubuntu2404 }
display_name: "${ruby}, ${all-os}"
tasks:
- name: "test"
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/update-evergreen-configs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module ConfigProcessor

# all supported JRuby versions provided by 10gen/mongo-ruby-toolchain
def jrubies
@jrubies ||= %w[ jruby-10.0 jruby-9.4 jruby-9.3 ]
@jrubies ||= %w[ jruby-10.1 jruby-10.0 jruby-9.4 jruby-9.3 ]
end

# all supported MRI ruby versions
Expand Down
14 changes: 7 additions & 7 deletions src/main/org/bson_ruby/ByteBuf.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public IRubyObject initialize(final RubyString value) {
*/
@JRubyMethod(name = "length")
public RubyFixnum getLength(ThreadContext context) {
return new RubyFixnum(context.runtime, getLengthInternal());
return RubyFixnum.newFixnum(context.runtime, getLengthInternal());
}

private int getLengthInternal() {
Expand All @@ -173,7 +173,7 @@ private int getLengthInternal() {
*/
@JRubyMethod(name = "read_position")
public RubyFixnum getReadPosition(ThreadContext context) {
return new RubyFixnum(context.runtime, this.readPosition);
return RubyFixnum.newFixnum(context.runtime, this.readPosition);
}

/**
Expand All @@ -185,7 +185,7 @@ public RubyFixnum getReadPosition(ThreadContext context) {
*/
@JRubyMethod(name = "write_position")
public RubyFixnum getWritePosition(ThreadContext context) {
return new RubyFixnum(context.runtime, this.writePosition);
return RubyFixnum.newFixnum(context.runtime, this.writePosition);
}

/**
Expand Down Expand Up @@ -287,7 +287,7 @@ public RubyString getCString(ThreadContext context) {
*/
@JRubyMethod(name = "get_decimal128_bytes")
public RubyString getDecimal128Bytes() {
return getBytes(new RubyFixnum(getRuntime(), 16));
return getBytes(RubyFixnum.newFixnum(getRuntime(), 16));
}

/**
Expand Down Expand Up @@ -315,7 +315,7 @@ public RubyFloat getDouble() {
@JRubyMethod(name = "get_int32")
public RubyFixnum getInt32() {
ensureBsonRead();
RubyFixnum int32 = new RubyFixnum(getRuntime(), this.buffer.getInt());
RubyFixnum int32 = RubyFixnum.newFixnum(getRuntime(), this.buffer.getInt());
this.readPosition += 4;
return int32;
}
Expand All @@ -335,7 +335,7 @@ public RubyFixnum getUInt32() {
temp += UINT32_MAX + 1;
}

RubyFixnum int32 = new RubyFixnum(getRuntime(), temp);
RubyFixnum int32 = RubyFixnum.newFixnum(getRuntime(), temp);
this.readPosition += 4;
return int32;
}
Expand Down Expand Up @@ -380,7 +380,7 @@ public RubyString getString(ThreadContext context) {
@JRubyMethod(name = "get_int64")
public RubyFixnum getInt64() {
ensureBsonRead();
RubyFixnum int64 = new RubyFixnum(getRuntime(), this.buffer.getLong());
RubyFixnum int64 = RubyFixnum.newFixnum(getRuntime(), this.buffer.getLong());
this.readPosition += 8;
return int64;
}
Expand Down
Loading