# Review: Misc ActiveRecord bug fixes

**URL:** <https://www.ruby-forum.com/t/review-misc-activerecord-bug-fixes/171047>\
**Category:** IronRuby\
**Created:** [June 25, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/review-misc-activerecord-bug-fixes/171047 "2009-06-25T19:26:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [June 25, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/review-misc-activerecord-bug-fixes/171047/1 "2009-06-25T19:26:36Z")

</div>

> <https://github.com/shri-zz/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2>
>
> Partial implementation of Kernel#test
> Effectively call Thread.critical=false whe…n a thread exits after having done Thread.critical=true. monitor.rb in the standard library uses this pattern
> Adds support for YAML::Omap (used in ActiveRecord) by doing "require 'yaml/types.rb'" in our yaml.rb
> Changes path in RakeTests.rb
> Deletes redist-libs/ruby/site\_ruby/1.8/ubygems.rb which seems like it was added by mistake

Fix bug in LightLambda.CreateCustomDelegate - it was not dealing with  
valuetype arguments.  
Partial implementation of Kernel#test  
Effectively call Thread.critical=false when a thread exits after having  
done Thread.critical=true. monitor.rb in the standard library uses this  
pattern  
Adds support for YAML::Omap (used in ActiveRecord) by doing “require  
‘yaml/types.rb’” in our yaml.rb  
Changes path in RakeTests.rb  
Deletes redist-libs/ruby/site\_ruby/1.8/ubygems.rb which seems like it  
was added by mistake

Files affected:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/kernel/test\_tags.txt  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_reference\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_reference\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element_reference_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_set\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_set\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element_set_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has\_key\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has\_key\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has_key_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/Ruby/redist-libs/ruby/site\_ruby/1.8/ubygems.rb  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/KernelOps.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-6](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-6)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/ThreadOps.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-7](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-7)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Initializers.Generated.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-8](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-8)  
\*  
Merlin/Main/Languages/Ruby/Libs/yaml.rb[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-9](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-9)  
\*  
Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyContext.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-10](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-10)  
\*  
Merlin/Main/Languages/Ruby/Tests/Scripts/RakeTests.rb[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-11](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-11)  
\*  
Merlin/Main/Runtime/Microsoft.Scripting/Interpreter/LightLambda.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-12](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-12)

Thanks,  
Shri

---

<div class="post-metadata">

**Author:** ![Shri\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/898d66/32.png) [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Post date:** [June 25, 2009, 7:38pm UTC](https://www.ruby-forum.com/t/review-misc-activerecord-bug-fixes/171047/2 "2009-06-25T19:38:57Z")

</div>

Kernel.cs: switch ((char)cmd) will blow up if char \> 0xffff or \< 0.  
There is an implicit conversion from int to char, so the cast is  
unnecessary. It seems that Ruby uses (cmd & 0xff) as a value of the  
command.

Other than that looks good.

Tomas

From: Shri B.  
Sent: Thursday, June 25, 2009 10:22 AM  
To: removed\_email\_address@domain.invalid  
Cc: IronRuby External Code R.  
Subject: Review: Misc ActiveRecord bug fixes

> <https://github.com/shri-zz/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2>
>
> Partial implementation of Kernel#test
> Effectively call Thread.critical=false whe…n a thread exits after having done Thread.critical=true. monitor.rb in the standard library uses this pattern
> Adds support for YAML::Omap (used in ActiveRecord) by doing "require 'yaml/types.rb'" in our yaml.rb
> Changes path in RakeTests.rb
> Deletes redist-libs/ruby/site\_ruby/1.8/ubygems.rb which seems like it was added by mistake

Fix bug in LightLambda.CreateCustomDelegate - it was not dealing with  
valuetype arguments.  
Partial implementation of Kernel#test  
Effectively call Thread.critical=false when a thread exits after having  
done Thread.critical=true. monitor.rb in the standard library uses this  
pattern  
Adds support for YAML::Omap (used in ActiveRecord) by doing “require  
‘yaml/types.rb’” in our yaml.rb  
Changes path in RakeTests.rb  
Deletes redist-libs/ruby/site\_ruby/1.8/ubygems.rb which seems like it  
was added by mistake

Files affected:

- 

Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/kernel/test\_tags.txt  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/each_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_reference\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_reference\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element_reference_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_set\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element\_set\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/element_set_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has\_key\_spec.rb[http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA\_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has\_key\_spec.rb](http://github.com/shri/ironruby/tree/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/rubyspec/library/yaml/omap/has_key_spec.rb)  
\*  
Merlin/External.LCA\_RESTRICTED/Languages/Ruby/redist-libs/ruby/site\_ruby/1.8/ubygems.rb  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/KernelOps.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-6](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-6)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Builtins/ThreadOps.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-7](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-7)  
\*  
Merlin/Main/Languages/Ruby/Libraries.LCA\_RESTRICTED/Initializers.Generated.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-8](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-8)  
\*  
Merlin/Main/Languages/Ruby/Libs/yaml.rb[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-9](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-9)  
\*  
Merlin/Main/Languages/Ruby/Ruby/Runtime/RubyContext.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-10](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-10)  
\*  
Merlin/Main/Languages/Ruby/Tests/Scripts/RakeTests.rb[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-11](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-11)  
\*  
Merlin/Main/Runtime/Microsoft.Scripting/Interpreter/LightLambda.cs[http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-12](http://github.com/shri/ironruby/commit/000ccff01b5a5cb53c140e94dc3f4c2e34806ba2#diff-12)

Thanks,  
Shri
