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

Commits on May 2, 2016

  1. Copy the full SHA
    6213d4b View commit details
  2. Copy the full SHA
    3784ff4 View commit details
2 changes: 2 additions & 0 deletions test/truffle/cexts/method/.jruby-cext-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src: ext/method/*.c
out: lib/method/method.su
5 changes: 5 additions & 0 deletions test/truffle/cexts/method/bin/method
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby

require 'method'

puts MethodExtension.add(14, 2)
1 change: 1 addition & 0 deletions test/truffle/cexts/method/expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
2 changes: 2 additions & 0 deletions test/truffle/cexts/method/ext/method/extconf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'mkmf'
create_makefile('method')
10 changes: 10 additions & 0 deletions test/truffle/cexts/method/ext/method/method.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <ruby.h>

VALUE add(VALUE self, VALUE a, VALUE b) {
return INT2NUM(NUM2INT(a) + NUM2INT(b));
}

void Init_method() {
VALUE module = rb_define_module("MethodExtension");
rb_define_module_function(module, "add", &add, 2);
}
1 change: 1 addition & 0 deletions test/truffle/cexts/method/lib/method.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'method/method'
Empty file.
2 changes: 0 additions & 2 deletions test/truffle/cexts/module/ext/module/module.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <stdio.h>

#include <ruby.h>

void Init_module() {