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

Commits on May 1, 2016

  1. Copy the full SHA
    8899f66 View commit details
  2. Copy the full SHA
    0f48e29 View commit details
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/ext/ffi/AbstractMemory.java
Original file line number Diff line number Diff line change
@@ -393,7 +393,7 @@ public IRubyObject write_short(ThreadContext context, IRubyObject value) {
* @param value The value to write.
* @return The value written.
*/
@JRubyMethod(name = { "put_int16", "put_short" }, required = 1)
@JRubyMethod(name = { "put_int16", "put_short", "write_int16" }, required = 1)
public IRubyObject put_int16(ThreadContext context, IRubyObject value) {
getMemoryIO().putShort(0, Util.int16Value(value));

@@ -535,7 +535,7 @@ public IRubyObject write_int(ThreadContext context, IRubyObject value) {
* @param value The value to write.
* @return The value written.
*/
@JRubyMethod(name = { "put_int32", "put_int" })
@JRubyMethod(name = { "put_int32", "put_int", "write_int32" })
public IRubyObject put_int32(ThreadContext context, IRubyObject value) {
getMemoryIO().putInt(0, Util.int32Value(value));

Original file line number Diff line number Diff line change
@@ -20,6 +20,16 @@
@CoreClass(name = "Truffle::System")
public abstract class TruffleSystemNodes {

@CoreMethod(names = "host_cpu", onSingleton = true)
public abstract static class HostCPUNode extends CoreMethodNode {

@Specialization
public DynamicObject hostCPU() {
return createString(StringOperations.encodeRope(RbConfigLibrary.getArchitecture(), UTF8Encoding.INSTANCE));
}

}

@CoreMethod(names = "host_os", onSingleton = true)
public abstract static class HostOSNode extends CoreMethodNode {

1 change: 1 addition & 0 deletions truffle/src/main/ruby/core/config.rb
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ module RbConfig
'exeext' => '',
'EXEEXT' => '',
'host_os' => Truffle::System.host_os,
'host_cpu' => Truffle::System.host_cpu,
'bindir' => "#{Truffle::Boot.jruby_home_directory}/bin",
'libdir' => "#{Truffle::Boot.jruby_home_directory}/lib/ruby/truffle",
'ruby_install_name' => 'jruby',