Skip to content

Instantly share code, notes, and snippets.

Certificate:
Data:
Version: 3 (0x2)
Serial Number: 946072060 (0x3863e9fc)
Signature Algorithm: sha1WithRSAEncryption
Issuer: O=Entrust.net, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU=(c) 1999 Entrust.net Limited, CN=Entrust.net Certification Authority (2048)
Validity
Not Before: Dec 10 20:43:54 2009 GMT
Not After : Dec 10 21:13:54 2019 GMT
Subject: C=US, O=Entrust, Inc., OU=www.entrust.net/rpa is incorporated by reference, OU=(c) 2009 Entrust, Inc., CN=Entrust Certification Authority - L1C
% ruby187 -e 'defined?(raise::Foo)'
% jruby -e 'defined?(raise::Foo)'
% jruby --1.9 -e 'defined?(raise::Foo)'
% rbx -e 'defined?(raise::Foo)'
% ruby -e 'defined?(raise::Foo)'
-e:1:in `<main>': unhandled exception
% ruby -e 'p defined?(raise)'
"method"
From 8290963b651a418f4d34edf33734f56913770b27 Mon Sep 17 00:00:00 2001
From: Hiroshi Nakamura <nahi@ruby-lang.org>
Date: Wed, 21 Dec 2011 18:38:38 +0900
Subject: [PATCH] Avoid circular require caused by rubygems/maven_gemify
Circular require detection logic was introduced by series of
require/autoload fixes. The file rubygems/maven_gemify.rb caused 2
circular-require-warnings for 1.9 mode because RubyGems itself intends to
autoload SpecFetcher and RemoteFetcher. Eager loading of maven_gemify.rb
ruins those effort and causes warnings.
@nahi
nahi / gist:1499760
Created December 20, 2011 01:22
Let me in!
diff --git a/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb b/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb
index 5ac93ff..c637a71 100644
--- a/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb
+++ b/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb
@@ -212,7 +212,7 @@ class Gem::Package::TarInput
# times. And that's the way it is.
def zipped_stream(entry)
- if defined? Rubinius or defined? Maglev then
+ if true
require 'thread'
class Foo
attr_reader :a
attr_reader :assignment_count, :evaluation_count
def initialize
@a = nil
@evaluation_lock = Mutex.new
@assignment_lock = Mutex.new
class Foo
def initialize
@var = 0
@updated = false
end
def update
@updated = true
@var = 42
end
require 'test/unit'
require 'tempfile'
class TestRequireOnce < Test::Unit::TestCase
def test_require_fires_once_across_threads
file = Tempfile.open(['target', '.rb'])
file.puts "$foo += 1"
file.close
$foo = 0
100.times do |idx|
diff --git a/src/org/jruby/runtime/load/LoadService.java b/src/org/jruby/runtime/load/LoadService.java
index e78b69d..311abf4 100644
--- a/src/org/jruby/runtime/load/LoadService.java
+++ b/src/org/jruby/runtime/load/LoadService.java
@@ -400,7 +400,7 @@ public class LoadService {
if (requireLock.isLocked()) {
requireLock.unlock();
}
- requireLocks.remove(requireName);
+ //requireLocks.remove(requireName);
@nahi
nahi / gist:1450665
Created December 9, 2011 07:51
dsaWithSHA1 signature by RSA 2048 key? [with openssl 1.0.1-snapshot]
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1 (0x1)
Signature Algorithm: dsaWithSHA1
Issuer: DC=org, DC=ruby-lang, CN=CA
Validity
Not Before: Dec 9 07:48:39 2011 GMT
Not After : Dec 9 08:48:39 2011 GMT
Subject: DC=org, DC=ruby-lang, CN=CA
http://www.ruby-assn.org/ja/releases/20111025_grant.htm
(Project summary by emboss)
The goal of the krypt project is to provide a platform- and library-independent cryptography API for Ruby. Not only C-based Ruby implementations should be able to benefit from it, but there will also be an implementation for JRuby.
The focus is on providing most of the features in Ruby, while additionally offering the possibility to integrate OS- or language-specific native libraries to implement cryptographic primitives. The milestones of the grant period cover two of the major building blocks of krypt: a streaming ASN.1 parser and a Ruby DSL for parsing and encoding arbitrary ASN.1 objects - the basic building blocks of most cryptographic protocols. There will be 2 separate implementations for Java- and C-based Rubies to guarantee maximum performance, offering a Ruby interface that will be used throughout the library to implement higher-level functionality. Documentation includes RDoc, general interface documentation in t