[#34033] The rights of ruby-core people and Myth of ruby-dev — "NARUSE, Yui" <naruse@...>

Some of you may don't know your rights.

32 messages 2011/01/03
[#34067] Re: The rights of ruby-core people and Myth of ruby-dev — Aaron Patterson <aaron@...> 2011/01/04

On Tue, Jan 04, 2011 at 06:55:47AM +0900, NARUSE, Yui wrote:

[#34043] proposal: gem_prelude needs to die — Ryan Davis <ryand-ruby@...>

I think it is time for gem_prelude to die.

21 messages 2011/01/04
[#34077] Re: proposal: gem_prelude needs to die — Tanaka Akira <akr@...> 2011/01/05

2011/1/4 Ryan Davis <ryand-ruby@zenspider.com>:

[#34091] Moving to Git? — Lucas Nussbaum <lucas@...>

Hi,

87 messages 2011/01/05
[#34099] Re: Moving to Git? — KOSAKI Motohiro <kosaki.motohiro@...> 2011/01/05

> Hi,

[#34103] Re: Moving to Git? — "U.Nakamura" <usa@...> 2011/01/05

Hello,

[#34105] Re: Moving to Git? — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2011/01/05

Em 05-01-2011 13:15, U.Nakamura escreveu:

[#34106] Re: Moving to Git? — "NARUSE, Yui" <naruse@...> 2011/01/05

(2011/01/06 0:46), Rodrigo Rosenfeld Rosas wrote:

[#34112] Re: Moving to Git? — Jon <jon.forums@...> 2011/01/05

> > Well, I guess I can help listing some advantages. Using git:

[#34118] Re: Moving to Git? — mathew <meta@...> 2011/01/05

On Wed, Jan 5, 2011 at 11:28, Jon <jon.forums@gmail.com> wrote:

[#34121] Re: Moving to Git? — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2011/01/05

Em 05-01-2011 17:16, mathew escreveu:

[#34129] Re: Moving to Git? — mathew <meta@...> 2011/01/05

On Wed, Jan 5, 2011 at 13:23, Rodrigo Rosenfeld Rosas

[#34138] Re: Moving to Git? — Czarek <cezary.baginski@...> 2011/01/05

On Thu, Jan 06, 2011 at 06:50:24AM +0900, mathew wrote:

[#34188] Re: Moving to Git? — mathew <meta@...> 2011/01/06

On Wed, Jan 5, 2011 at 17:02, Czarek <cezary.baginski@gmail.com> wrote:

[#34191] Re: Moving to Git? — Lucas Nussbaum <lucas@...> 2011/01/06

On 07/01/11 at 01:05 +0900, mathew wrote:

[#34201] Re: Moving to Git? — mathew <meta@...> 2011/01/06

On Thu, Jan 6, 2011 at 10:36, Lucas Nussbaum <lucas@lucas-nussbaum.net> wrote:

[#34206] Re: Moving to Git? — Lucas Nussbaum <lucas@...> 2011/01/07

On 07/01/11 at 08:07 +0900, mathew wrote:

[#34227] Re: Moving to Git? — mathew <meta@...> 2011/01/07

On Thu, Jan 6, 2011 at 23:50, Lucas Nussbaum <lucas@lucas-nussbaum.net> wrote:

[#34231] Re: Moving to Git? — Daniel Bovensiepen <bovensiepen@...> 2011/01/07

Dear all,

[#34116] Re: Moving to Git? — Yukihiro Matsumoto <matz@...> 2011/01/05

Hi,

[#34117] Re: Moving to Git? — Rodrigo Rosenfeld Rosas <rr.rosas@...> 2011/01/05

What kind of Redmine integration you are talking about? We use Redmine

[#34120] Re: Moving to Git? — Yukihiro Matsumoto <matz@...> 2011/01/05

Hi,

[#34125] Re: Moving to Git? — Nikolai Weibull <now@...> 2011/01/05

On Wed, Jan 5, 2011 at 19:57, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:

[#34124] [Ruby 1.9-Bug#4235][Open] svn keywords in code prevent correct building of ruby using git mirror — Stephen Bannasch <redmine@...>

Bug #4235: svn keywords in code prevent correct building of ruby using git mirror

12 messages 2011/01/05

[#34171] [Ruby 1.8-Feature#4239][Open] Let's begin a talk for "1.8.8" -- How's needed for surviving 1.8? — Shota Fukumori <redmine@...>

Feature #4239: Let's begin a talk for "1.8.8" -- How's needed for surviving 1.8?

104 messages 2011/01/06
[#34514] [Ruby 1.8-Feature#4239] Let's begin a talk for "1.8.8" -- How's needed for surviving 1.8? — Zeno Davatz <redmine@...> 2011/01/15

Issue #4239 has been updated by Zeno Davatz.

[#34516] Re: [Ruby 1.8-Feature#4239] Let's begin a talk for "1.8.8" -- How's needed for surviving 1.8? — "NARUSE, Yui" <naruse@...> 2011/01/15

(2011/01/16 0:11), Zeno Davatz wrote:

[#34214] [Ruby 1.9-Feature#4247][Open] New features for Array#sample, Array#choice — Yoji Ojima <redmine@...>

Feature #4247: New features for Array#sample, Array#choice

10 messages 2011/01/07

[#34267] [Ruby 1.9-Feature#4254][Open] Allow method transplanting — Jonas Pfenniger <redmine@...>

Feature #4254: Allow method transplanting

23 messages 2011/01/09
[#34280] Re: [Ruby 1.9-Feature#4254][Open] Allow method transplanting — Yukihiro Matsumoto <matz@...> 2011/01/10

Hi,

[#34299] [Ruby 1.9-Bug#4256][Open] [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18) [i386-mingw32] — Rama Mahendravada <redmine@...>

Bug #4256: [BUG] Segmentation fault ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

9 messages 2011/01/10

[#34318] ext/bigdecimal/lib/bigdecimal/util.rb — Aaron Patterson <aaron@...>

Hi Murata!

14 messages 2011/01/11
[#34321] Re: ext/bigdecimal/lib/bigdecimal/util.rb — Yukihiro Matsumoto <matz@...> 2011/01/11

Hi,

[#34354] [Ruby 1.9-Feature#4264][Open] General type coercion protocol for Ruby — Charles Nutter <redmine@...>

Feature #4264: General type coercion protocol for Ruby

33 messages 2011/01/11
[#34359] Re: [Ruby 1.9-Feature#4264][Open] General type coercion protocol for Ruby — Jim Weirich <jim.weirich@...> 2011/01/11

[#34355] [Ruby 1.9-Feature#4265][Open] Provide a core method Kernel#ruby for invoking a new Ruby instance — Charles Nutter <redmine@...>

Feature #4265: Provide a core method Kernel#ruby for invoking a new Ruby instance

15 messages 2011/01/11

[#34362] [Ruby 1.9-Bug#4266][Open] Timeouts in threads cause "ThreadError: deadlock; recursive locking" — Christopher Bottaro <redmine@...>

Bug #4266: Timeouts in threads cause "ThreadError: deadlock; recursive locking"

12 messages 2011/01/11

[#34399] [Ruby 1.9-Bug#4272][Open] rb_enc_str_new() causes segmentfault when using threads in parallel — Iñaki Baz Castillo <redmine@...>

Bug #4272: rb_enc_str_new() causes segmentfault when using threads in parallel

14 messages 2011/01/12

[#34534] [Ruby 1.9-Bug#4283][Open] Timeout.timeout may cause application exit unintetionally — Motohiro KOSAKI <redmine@...>

Bug #4283: Timeout.timeout may cause application exit unintetionally

11 messages 2011/01/17

[#34537] [Ruby 1.9-Bug#4285][Open] Ruby don't have asynchrounous exception safe syntax and It should have. — Motohiro KOSAKI <redmine@...>

Bug #4285: Ruby don't have asynchrounous exception safe syntax and It should have.

12 messages 2011/01/17

[#34550] [Ruby 1.9-Feature#4288][Open] Allow invoking arbitrary method names with foo."something" syntax — Charles Nutter <redmine@...>

Feature #4288: Allow invoking arbitrary method names with foo."something" syntax

13 messages 2011/01/18
[#34616] Re: [Ruby 1.9-Feature#4288][Open] Allow invoking arbitrary method names with foo."something" syntax — Gary Wright <gwtmp01@...> 2011/01/19

[#34577] Importing rubygems 1.5.0 (release candidate) into trunk. — Ryan Davis <ryand-ruby@...>

I'm going to be committing rubygems 1.5.0 into trunk in a bit.

13 messages 2011/01/18

[#34632] Ruby operator equivalent to Groovy's "?." — Rodrigo Rosenfeld Rosas <rr.rosas@...>

One of the few things I like in Groovy that Ruby doesn't support is

19 messages 2011/01/20

[#34634] Returning from the callee — Rodrigo Rosenfeld Rosas <rr.rosas@...>

Sometimes it is useful to be able to return from the callee method.

15 messages 2011/01/20

[#34648] [Ruby 1.9-Bug#4298][Open] Duration of calling String#[] with the same index is strangely related to string length. — Radosław Bułat <redmine@...>

Bug #4298: Duration of calling String#[] with the same index is strangely related to string length.

13 messages 2011/01/20

[#34861] [Ruby 1.9-Feature#4326][Open] Fiber should respond to call() and [] — Aaron Patterson <redmine@...>

Feature #4326: Fiber should respond to call() and []

21 messages 2011/01/26
[#34943] [Ruby 1.9-Feature#4326] Fiber should respond to call() and [] — Charles Nutter <redmine@...> 2011/01/28

Issue #4326 has been updated by Charles Nutter.

[#34954] Re: [Ruby 1.9-Feature#4326] Fiber should respond to call() and [] — Aaron Patterson <aaron@...> 2011/01/28

On Sat, Jan 29, 2011 at 02:58:46AM +0900, Charles Nutter wrote:

[#34957] Re: [Ruby 1.9-Feature#4326] Fiber should respond to call() and [] — Charles Oliver Nutter <headius@...> 2011/01/29

On Fri, Jan 28, 2011 at 5:29 PM, Aaron Patterson

[#34869] make ruby support line continuations ? — Marc Chantreux <khatar@...>

hello,

22 messages 2011/01/26
[#34878] Re: make ruby support line continuations ? — Jim Freeze <jimfreeze@...> 2011/01/26

> I love it so much i tried it in ruby. trying to rewrite:

[#34887] Re: make ruby support line continuations ? — Marc Chantreux <khatar@...> 2011/01/27

hello,

[#34889] Re: make ruby support line continuations ? — V咜 Ondruch <v.ondruch@...> 2011/01/27

Dne 27.1.2011 7:15, Marc Chantreux napsal(a):

[#34911] The ruby-lang.org downloads page should include RVM for OS X — Andrew Vos <andrew.vos@...>

(I sent this before I subscribed and I'm not sure if it bounced. Sorry if

21 messages 2011/01/27
[#34912] Re: The ruby-lang.org downloads page should include RVM for OS X — "Shota Fukumori (sora_h)" <sorah@...> 2011/01/27

RVM is not official, and makes problem more difficult. (magically

[#34913] Re: The ruby-lang.org downloads page should include RVM for OS X — Andrew Vos <andrew.vos@...> 2011/01/27

What do you mean by "official"? Also, what does it make more difficult? Do

[#34914] Re: The ruby-lang.org downloads page should include RVM for OS X — "Shota Fukumori (sora_h)" <sorah@...> 2011/01/27

return mail is gmail thing. I have same problem.

[#34970] [Ruby 1.9-Bug#4343][Open] Dir.glob does match files without extension — Vit Ondruch <redmine@...>

Bug #4343: Dir.glob does match files without extension

26 messages 2011/01/29
[#34975] [Ruby 1.9-Bug#4343] Dir.glob does match files without extension — Nobuyoshi Nakada <redmine@...> 2011/01/29

Issue #4343 has been updated by Nobuyoshi Nakada.

[#34978] Re: [Ruby 1.9-Bug#4343] Dir.glob does match files without extension — Jeremy Bopp <jeremy@...> 2011/01/29

On 01/29/2011 10:19 AM, Nobuyoshi Nakada wrote:

[#34979] Re: [Ruby 1.9-Bug#4343] Dir.glob does match files without extension — Vít Ondruch <v.ondruch@...> 2011/01/29

Dne 29.1.2011 17:27, Jeremy Bopp napsal(a):

[#34981] Re: [Ruby 1.9-Bug#4343] Dir.glob does match files without extension — Jeremy Bopp <jeremy@...> 2011/01/29

On 01/29/2011 10:33 AM, Vテュt Ondruch wrote:

[#34982] Re: [Ruby 1.9-Bug#4343] Dir.glob does match files without extension — Vít Ondruch <v.ondruch@...> 2011/01/29

Dne 29.1.2011 17:53, Jeremy Bopp napsal(a):

[ruby-core:34818] [Ruby 1.9-Feature#4309] [ext/openssl] ASN1 performance enhancement

From: Martin Bosslet <redmine@...>
Date: 2011-01-24 01:26:13 UTC
List: ruby-core #34818
Issue #4309 has been updated by Martin Bosslet.

File class_tag_map2.diff added

Added tests that further assert behavior of OpenSSL::ASN1::default_tag/default_tag_class_of. Attachment replaces the first one.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/4309

----------------------------------------
http://redmine.ruby-lang.org

Attachments (1)

class_tag_map2.diff (7.59 KB, text/x-patch)
Property changes on: ruby/ext/openssl
___________________________________________________________________
Modified: svn:ignore
   - GNUmakefile
Makefile
dep
extconf.h
mkmf.log
openssl.a
conftest.dSYM

   + GNUmakefile
Makefile
dep
extconf.h
mkmf.log
openssl.a
conftest.dSYM
openssl.so


Index: ruby/ext/openssl/ossl_asn1.c
===================================================================
--- ruby/ext/openssl/ossl_asn1.c	(revision 30640)
+++ ruby/ext/openssl/ossl_asn1.c	(working copy)
@@ -454,7 +454,7 @@
 } ossl_asn1_info_t;
 
 static ossl_asn1_info_t ossl_asn1_info[] = {
-    { "EOC",               &cASN1EndOfContent,    },  /*  0 */
+    { "END_OF_CONTENT",    &cASN1EndOfContent,    },  /*  0 */
     { "BOOLEAN",           &cASN1Boolean,         },  /*  1 */
     { "INTEGER",           &cASN1Integer,         },  /*  2 */
     { "BIT_STRING",        &cASN1BitString,       },  /*  3 */
@@ -487,10 +487,34 @@
     { "BMPSTRING",         &cASN1BMPString,       },  /* 30 */
 };
 
+
+
 int ossl_asn1_info_size = (sizeof(ossl_asn1_info)/sizeof(ossl_asn1_info[0]));
 
+static VALUE class_tag_map;
+
 static int ossl_asn1_default_tag(VALUE obj);
 
+static VALUE
+ossl_asn1_default_tag_class(VALUE self, VALUE klass)
+{
+    VALUE tag = rb_hash_lookup(class_tag_map, klass);
+    if (tag != Qnil) {
+        return tag;
+    }
+
+    ossl_raise(eASN1Error, "universal tag for %s not found",
+	       rb_class2name(klass));
+
+    return Qnil; /* dummy */
+}
+
+static VALUE
+ossl_asn1_default_tag_public(VALUE self, VALUE obj)
+{
+  return INT2NUM(ossl_asn1_default_tag(obj));
+}
+
 ASN1_TYPE*
 ossl_asn1_get_asn1type(VALUE obj)
 {
@@ -570,14 +594,15 @@
 static int
 ossl_asn1_default_tag(VALUE obj)
 {
-    int i;
+    VALUE tmp_class = CLASS_OF(obj);
+    while (tmp_class) {
+        VALUE tag = rb_hash_lookup(class_tag_map, tmp_class);
+        if (tag != Qnil) {
+            return NUM2INT(tag);
+        }
+        tmp_class = RCLASS_SUPER(tmp_class);
+    }
 
-    for(i = 0; i < ossl_asn1_info_size; i++){
-	if(ossl_asn1_info[i].klass &&
-	   rb_obj_is_kind_of(obj, *ossl_asn1_info[i].klass)){
-	    return i;
-	}
-    }
     ossl_raise(eASN1Error, "universal tag for %s not found",
 	       rb_class2name(CLASS_OF(obj)));
 
@@ -841,7 +866,7 @@
             ossl_asn1_set_infinite_length(asn1data, Qtrue);
         else
             ossl_asn1_set_infinite_length(asn1data, Qfalse);
-        
+
 	rb_ary_push(ary, asn1data);
 	length -= len;
         if(once) break;
@@ -1190,6 +1215,8 @@
     rb_define_module_function(mASN1, "traverse", ossl_asn1_traverse, 1);
     rb_define_module_function(mASN1, "decode", ossl_asn1_decode, 1);
     rb_define_module_function(mASN1, "decode_all", ossl_asn1_decode_all, 1);
+    rb_define_module_function(mASN1, "default_tag_of_class", ossl_asn1_default_tag_class, 1);
+    rb_define_module_function(mASN1, "default_tag", ossl_asn1_default_tag_public, 1);
     ary = rb_ary_new();
     rb_define_const(mASN1, "UNIVERSAL_TAG_NAME", ary);
     for(i = 0; i < ossl_asn1_info_size; i++){
@@ -1260,4 +1287,31 @@
     rb_attr(cASN1BitString, rb_intern("unused_bits"), 1, 1, 0);
 
     rb_define_method(cASN1EndOfContent, "initialize", ossl_asn1eoc_initialize, 0);
+
+    class_tag_map = rb_hash_new();
+    rb_hash_aset(class_tag_map, cASN1EndOfContent, INT2NUM(0));
+    rb_hash_aset(class_tag_map, cASN1Boolean, INT2NUM(1));
+    rb_hash_aset(class_tag_map, cASN1Integer, INT2NUM(2));
+    rb_hash_aset(class_tag_map, cASN1BitString, INT2NUM(3));
+    rb_hash_aset(class_tag_map, cASN1OctetString, INT2NUM(4));
+    rb_hash_aset(class_tag_map, cASN1Null, INT2NUM(5));
+    rb_hash_aset(class_tag_map, cASN1ObjectId, INT2NUM(6));
+    rb_hash_aset(class_tag_map, cASN1Enumerated, INT2NUM(10));
+    rb_hash_aset(class_tag_map, cASN1UTF8String, INT2NUM(12));
+    rb_hash_aset(class_tag_map, cASN1Sequence, INT2NUM(16));
+    rb_hash_aset(class_tag_map, cASN1Set, INT2NUM(17));
+    rb_hash_aset(class_tag_map, cASN1NumericString, INT2NUM(18));
+    rb_hash_aset(class_tag_map, cASN1PrintableString, INT2NUM(19));
+    rb_hash_aset(class_tag_map, cASN1T61String, INT2NUM(20));
+    rb_hash_aset(class_tag_map, cASN1VideotexString, INT2NUM(21));
+    rb_hash_aset(class_tag_map, cASN1IA5String, INT2NUM(22));
+    rb_hash_aset(class_tag_map, cASN1UTCTime, INT2NUM(23));
+    rb_hash_aset(class_tag_map, cASN1GeneralizedTime, INT2NUM(24));
+    rb_hash_aset(class_tag_map, cASN1GraphicString, INT2NUM(25));
+    rb_hash_aset(class_tag_map, cASN1ISO64String, INT2NUM(26));
+    rb_hash_aset(class_tag_map, cASN1GeneralString, INT2NUM(27));
+    rb_hash_aset(class_tag_map, cASN1UniversalString, INT2NUM(28));
+    rb_hash_aset(class_tag_map, cASN1BMPString, INT2NUM(30));
+
+    rb_define_const(mASN1, "CLASS_TAG_MAP", class_tag_map);
 }
Index: ruby/test/openssl/test_asn1.rb
===================================================================
--- ruby/test/openssl/test_asn1.rb	(revision 30640)
+++ ruby/test/openssl/test_asn1.rb	(working copy)
@@ -430,4 +430,54 @@
     end
   end
   
+  def test_default_tag_of_class
+    OpenSSL::ASN1::CLASS_TAG_MAP.each do |klass, tag|
+      assert_equal(tag, OpenSSL::ASN1.default_tag_of_class(klass))
+    end
+  end
+  
+  def test_default_tag
+    assert_equal(0, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::EndOfContent.new))    
+    assert_equal(1, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Boolean.new(true)))
+    assert_equal(2, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Integer.new(1)))
+    assert_equal(3, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::BitString.new("\x01")))
+    assert_equal(4, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::OctetString.new("\x01")))    
+    assert_equal(5, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Null.new(nil)))    
+    assert_equal(6, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::ObjectId.new("1.2.3.4.5")))    
+    assert_equal(10, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Enumerated.new(1)))    
+    assert_equal(12, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::UTF8String.new("a"))) 
+    assert_equal(16, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Sequence.new([])))    
+    assert_equal(17, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::Set.new([])))    
+    assert_equal(18, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::NumericString.new("a")))
+    assert_equal(19, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::PrintableString.new("a")))
+    assert_equal(20, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::T61String.new("a")))
+    assert_equal(21, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::VideotexString.new("a")))
+    assert_equal(22, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::IA5String.new("a")))
+    assert_equal(23, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::UTCTime.new(Time.now)))
+    assert_equal(24, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::GeneralizedTime.new(Time.now)))
+    assert_equal(25, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::GraphicString.new("a")))
+    assert_equal(26, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::ISO64String.new("a")))
+    assert_equal(27, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::GeneralString.new("a")))
+    assert_equal(28, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::UniversalString.new("a")))
+    assert_equal(30, OpenSSL::ASN1.default_tag(OpenSSL::ASN1::BMPString.new("a")))
+  end
+  
+  def test_default_tag_sub_class
+    asn1_class = Class.new(OpenSSL::ASN1::Integer)
+    asn1 = asn1_class.new(8)
+    assert_equal(2, OpenSSL::ASN1.default_tag(asn1))
+  end
+  
+  def test_default_tag_of_class_negative
+    assert_raises(OpenSSL::ASN1::ASN1Error) do
+      OpenSSL::ASN1.default_tag_of_class(Array)
+    end
+  end
+    
+  def test_default_tag_negative
+    assert_raises(OpenSSL::ASN1::ASN1Error) do
+      OpenSSL::ASN1.default_tag(OpenSSL::ASN1::ASN1Data.new(1, 2, nil))
+    end
+  end
+  
 end if defined?(OpenSSL)

In This Thread