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

Commits on Aug 27, 2016

  1. [Truffle] We need to set the MIME type automatically on reading an su…

    …, otherwise we'll get a misleading MIME type exception.
    chrisseaton committed Aug 27, 2016
    Copy the full SHA
    4aaeeaa View commit details

Commits on Aug 28, 2016

  1. Copy the full SHA
    2d36a71 View commit details
Showing with 9 additions and 9 deletions.
  1. +8 −8 truffle/src/main/c/openssl/ossl.c
  2. +1 −1 truffle/src/main/java/org/jruby/truffle/language/loader/SourceLoader.java
16 changes: 8 additions & 8 deletions truffle/src/main/c/openssl/ossl.c
Original file line number Diff line number Diff line change
@@ -539,7 +539,7 @@ static struct CRYPTO_dynlock_value *
ossl_dyn_create_callback(const char *file, int line)
{
struct CRYPTO_dynlock_value *dynlock = (struct CRYPTO_dynlock_value *)OPENSSL_malloc((int)sizeof(struct CRYPTO_dynlock_value));
rb_nativethread_lock_initialize(&dynlock->lock);
//rb_nativethread_lock_initialize(&dynlock->lock);
return dynlock;
}

@@ -583,18 +583,18 @@ static void Init_ossl_locks(void)
rb_raise(rb_eNoMemError, "CRYPTO_num_locks() is too big: %d", num_locks);
}
for (i = 0; i < num_locks; i++) {
rb_nativethread_lock_initialize(&ossl_locks[i]);
//rb_nativethread_lock_initialize(&ossl_locks[i]);
}

#ifdef HAVE_CRYPTO_THREADID_PTR
CRYPTO_THREADID_set_callback(ossl_threadid_func);
//CRYPTO_THREADID_set_callback(ossl_threadid_func);
#else
CRYPTO_set_id_callback(ossl_thread_id);
//CRYPTO_set_id_callback(ossl_thread_id);
#endif
CRYPTO_set_locking_callback(ossl_lock_callback);
CRYPTO_set_dynlock_create_callback(ossl_dyn_create_callback);
CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
//CRYPTO_set_locking_callback(ossl_lock_callback);
//CRYPTO_set_dynlock_create_callback(ossl_dyn_create_callback);
//CRYPTO_set_dynlock_lock_callback(ossl_dyn_lock_callback);
//CRYPTO_set_dynlock_destroy_callback(ossl_dyn_destroy_callback);
}
#endif /* !HAVE_OPENSSL_110_THREADING_API */

Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public Source load(String canonicalPath) throws IOException {
}

if (canonicalPath.toLowerCase().endsWith(".su")) {
return Source.newBuilder(file).name(file.getPath()).build();
return Source.newBuilder(file).name(file.getPath()).mimeType(RubyLanguage.CEXT_MIME_TYPE).build();
} else {
// We need to assume all other files are Ruby, so the file type detection isn't enough
return Source.newBuilder(file).name(file.getPath()).mimeType(RubyLanguage.MIME_TYPE).build();