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

Commits on Jun 22, 2016

  1. Copy the full SHA
    7409f6b View commit details
  2. Copy the full SHA
    00fce22 View commit details
Showing with 18 additions and 5 deletions.
  1. +8 −0 mx.jruby/mx_jruby.py
  2. +8 −0 mx.jruby/suite.py
  3. +0 −3 samples/truffle/interop/weather/README.md
  4. +1 −1 samples/truffle/interop/weather/weather.js
  5. +1 −1 samples/truffle/interop/weather/weather.rb
8 changes: 8 additions & 0 deletions mx.jruby/mx_jruby.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

import os
import subprocess
import shutil
8 changes: 8 additions & 0 deletions mx.jruby/suite.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. This
# code is released under a tri EPL/GPL/LGPL license. You can use it,
# redistribute it and/or modify it under the terms of the:
#
# Eclipse Public License version 1.0
# GNU General Public License version 2
# GNU Lesser General Public License version 2.1

suite = {
"mxversion": "5.6.6",
"name": "jrubytruffle",
3 changes: 0 additions & 3 deletions samples/truffle/interop/weather/README.md
Original file line number Diff line number Diff line change
@@ -5,6 +5,3 @@ RUBYOPT='-I samples/truffle/interop/weather/openweather/lib -I samples/truffle/i

The demo hangs after printing the temperature, as some Ruby service threads
get stuck and aren't shutting down properly.

The Ruby `temperature_in_city` method has a `this` parameter which it wouldn't
normally have, because JS passes `this` as the first argument.
2 changes: 1 addition & 1 deletion samples/truffle/interop/weather/weather.js
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@ Interop.eval('application/x-ruby', 'require "weather"');

temperature_in_city = Interop.import('temperature_in_city')

console.log('Temperature in New York now: ' + temperature_in_city('New York') + '℃');
console.log('Temperature in New York now: ' + temperature_in_city.call('New York') + '℃');
2 changes: 1 addition & 1 deletion samples/truffle/interop/weather/weather.rb
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
config.apikey = 'dd7073d18e3085d0300b6678615d904d'
end

def temperature_in_city(this, name)
def temperature_in_city(name)
name = Truffle::Interop.from_java_string(name)
weather = Openweather2.get_weather(city: name, units: 'metric')
weather.temperature