Jirapong,
Can you update to the latest on Github?

Thanks,

JD

...there is no try
http://blog.jredville.com

From: ironruby-core-boun...@rubyforge.org 
[mailto:ironruby-core-boun...@rubyforge.org] On Behalf Of Jirapong Nanta
Sent: Wednesday, August 12, 2009 1:03 AM
To: ironruby-core@rubyforge.org
Subject: Re: [Ironruby-core] OpenSSL::X509::Certificate + rubyspecs

Hello all,
    all modification as Shri's reviewed able to find at 
bed5f4c3ae97d5ecb18adc3827901cd5f18389cd<http://github.com/Jirapong/ironruby/commit/bed5f4c3ae97d5ecb18adc3827901cd5f18389cd>

Changes:

  1.  Validate all spec with MRI
  2.  Remove /*!*/ from Value Type
  3.  Check 64-bit integer with IntPtr.Zero
  4.  Tags fails the spec (pass MRI, fail in IronRuby)

Thank you,
-Jirapong
On Sat, Jul 25, 2009 at 5:46 AM, Shri Borde 
<shri.bo...@microsoft.com<mailto:shri.bo...@microsoft.com>> wrote:

Great to see these changes! Mostly looks good. The tests are quite clean 
overall. I do have some comments/questions... Btw, I assume you have run all 
the new specs against MRI to make sure they are correct. If not, please do run 
them with MRI.





Should the MutableString argument of CreateDigest be marked as DefaultProtocol? 
Either way, is there a spec for this case? Same with all other APIs. You do use 
MutableString in some places, you might have thought about it explicitly. Just 
checking.



In "public static int/*!*/ Seed(Digest/*!*/ self)", You don't have to use /*!*/ 
with valuetypes like int, since they can never be null.



You can use MutableString.CreateEmpty instead of MutableString.Create("");.



You use "_certificate.Handle.ToInt32() == 0". This will behave incorrectly on 
64-bits if the lower 32 bits of the pointer happen to be 0. Can't you compare 
with IntPtr.Zero? You can even add an extension



TESTS

-------



Is it possible to add a test that Digest.new does not call Digest#initialize?



For "x509_cert.subject.should == """, I think you can write it as 
"x509_cert.subject.should be_empty"



In issuer_spec.rb, you have "(@x509_cert.issuer = n).should equal(n)". This is 
not testing the right thing as shown by this example. Call the method issuer= 
directly like "(@x509_cert.issuer=(n).should equal(n)" instead. Same with 
"(@x509_cert.not_before = n).should equal(n)" and a few other places.

class C

 def foo=(v) "Return value" end

end

puts (C.new.foo = 1) # prints 1, not "Return value"



In version_spec.rb, I think you should use to_int instead of to_i in "m = 
mock(10).should_not_receive(:to_i)", but I am not 100% sure.



Thanks,

Shri



From: 
ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org> 
[mailto:ironruby-core-boun...@rubyforge.org<mailto:ironruby-core-boun...@rubyforge.org>]
 On Behalf Of Jirapong Nanta
Sent: Thursday, July 23, 2009 6:14 PM
To: ironruby-core
Subject: [Ironruby-core] OpenSSL::X509::Certificate + rubyspecs



Hi,

   I'm trying to get all my rubyspecs for openssl back to current repos.

  *   new rubyspecs for x509::Certificate; 
new,issuer,public_key,version,serial,subject
  *   new rubyspecs for x509::Name
  *   new rubyspecs for PKey::RSA
  *   implement x509::Certificate.new and get methods for 
issuer,subject,public_key,serial,and version
  *   tagged the fails rubyspes



http://github.com/Jirapong/ironruby/commit/40ddbcb700e402a43ad387cf69005a0795a033fb



Thank you,

-Jirapong

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org<mailto:Ironruby-core@rubyforge.org>
http://rubyforge.org/mailman/listinfo/ironruby-core

_______________________________________________
Ironruby-core mailing list
Ironruby-core@rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core

Reply via email to