# RubyCocoa 0.11.0

**URL:** <https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809>\
**Category:** Ruby\
**Created:** [May 22, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809 "2007-05-22T20:36:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/65b543/32.png) [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Post date:** [May 22, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809/1 "2007-05-22T20:36:18Z")

</div>

Hi,

I am honored to announce the immediate release of RubyCocoa 0.11.0.

RubyCocoa is a Mac OS X framework that allows Cocoa programming in the  
object-oriented scripting language Ruby. In other words, it is a  
bridge that let you access Objective-C objects from Ruby, and  
vice-versa.

You can learn more about RubyCocoa on our new website (which is  
actually a Wiki):

[http://rubycocoa.sf.net](http://rubycocoa.sf.net)

This is one of the biggest releases we ever made, thanks to all  
contributors. All RubyCocoa users are encouraged to upgrade.

Following are the release notes. Enjoy!

The RubyCocoa Team

Features:

- Now shipping with RDoc HTML/ri files covering the frameworks  
RubyCocoa supports. The methods and their documentation come from the  
latest reference documentation from Apple (07-05-2007) and have been  
parsed and manipulated to look like the syntax used on the Ruby side  
of RubyCocoa.
- Better global support for the C bits of frameworks, thanks to the  
new BridgeSupport changes. More exposure of C symbols, support for  
string constants, inline functions, functions with pointer-like  
arguments, function pointer arguments, opaque structures, magic-cookie  
constants, and more. Support for endianness-specific elements. Support  
for QuartzComposer.
- Introduced ActiveRecord bindings. It means that you can now use  
ActiveRecord in the same way you would use CoreData when writing the  
backend of your application. It also has support for ActiveRecord  
migrations. It comes with some extra OSX support, like creating and  
connecting to a SQLite database in the user’s ~/Library. There’s also  
a NSTableView subclass which has one extra instance method which  
allows you to scaffold the table columns for a given model.
- Added support for overriding class methods, using  
#objc\_class\_method. #objc\_export has been deprecated and #objc\_method  
should be used instead.
- Added support for aliasing Objective-C methods from ruby, via  
#objc\_alias\_method and #objc\_alias\_class\_method.
- Introduced new RBBundle API, to use RubyCocoa in a bundle (like  
SIMBL).
- Added syntax-sugar APIs to manage property lists. OSA.load\_plist, to  
deserialize plist data of any format to a Ruby object.  
#to\_plist(format=nil), to convert the given Ruby object to plist data  
of the given format (XML by default).
- Better interface of basic Objective-C types and their Ruby  
equivalents. NSString responds to all methods String does. Time  
objects are converted to NSDate objects. Added NSObject#to\_ruby, which  
converts the given Cocoa type to the Ruby equivalent (converting  
sub-elements for NSArray and NSDictionary).
- Support for C/Objective-C APIs using format strings. RubyCocoa is  
now able to parse the format string value and appropriately convert  
the variable arguments to the right type.
- Better ObjcPtr API. #assign, to assign a value to the pointer. #[],  
to retrieve something at a particular index. #[]=, to assign something  
at a particular index. #regard\_as, to specify the Objective-C encoding  
of the receiver.
- New tool: rb\_nibtool.rb, to synchronize nib files with RubyCocoa  
source files. Added #ib\_action to declare IBAction methods. Not  
necessary unless you want to use the tool.
- New tool: standalonify.rb, to detect all the Ruby dependencies of  
your application (including gems) and generate a new application with  
everything inside, to make easier its deployment.
- Added Xcode templates to do Ruby unit testing.
- RubyCocoa can now build 64-bit and fundamentally work on a 64-bit  
environment. However all tests are not passing yet.
- New sample code: sample/ViewModelDemo, sample/RubyAnywhere,  
sample/VPRubyPluginEnabler, sample/Fortune.wdgt, sample/CocoaRepl,  
sample/MailDemo/MailDemoActiveRecordBindings.

Bug fixes:

- Ruby 1.9 compatibility fixes.
- Now manually decoding the Objective-C runtime types.
- Better RBObject retention mechanism.
- Make sure builtin frameworks cannot be required twice.
- Fixed a memory leak when calling RBApplicationMain more than once.
- Converted the Xcode templates property lists from the old OpenStep  
format to UTF-8 XML.
- Fixed the import of NSProxy-based classes.
- Fixed a bug in the direct override code.
- Various fixes to make Cocoa printing functional (see the PathDemo  
sample for an example).
- Make sure everything is compiled with -O3. This is to make sure the  
FFI-generated closures are callable from the generated  
objc\_msgSent\_stret calls  
by GCC. Otherwise closures return C structure may cause memory  
corruption.
- Fixed a bug in the OCException class (making sure #userInfo is  
binded to the right instance variable).
- Deprecated ns\_override, ns\_outlet.
- Make sure to return nil when easy dispatching void methods.
- Fixed a dispatching issue about omitted pointers and CFType-like args.
- Ported to the 2.0 Objective-C runtime. Compatibility with the  
previous runtime is ensured.
- Do not access ruby\_frame-\>last\_func directly.
- Make sure to ignore classes that start with a lower character.  
Normally Ruby forbids this but some SWIG-based extensions have such  
class names.
- Now converting Ruby arrays to C-like arrays for arguments of type  
‘in’ that represent an array of a variable length.
- Fixed ObjCID#inspect.
- Fixed memory leaks in Ruby ↔ ObjC messaging.
- Allows RubyCocoa to be called by Objective-C from a thread that  
isn’t the main one, by routing the NSInvocation / FFI closure into the  
main thread via the main run loop. Prints a warning before routing.  
This is to avoid a crash since Ruby isn’t thread-safe.
- Refactored attachments to add methods directly to the Objective-C  
class and not using modules anymore, fixed NSEnumerator#to\_a.
- Fixed direct method override feature for Ruby \> 1.8.2 and \< 1.8.5.
- Better backtrace information of exceptions raised from Ruby.
- When wrapping a returned ocid in a Ruby object, if the wanted class  
name can’t be a constant (because starting with ‘\_’ or [a-z]), try to  
use the superclass name when possible.
- Do not crash if one resource (for example rb\_main.rb) isn’t found,  
but propose a clear message to the user instead.
- Added support for getting C\_ARY\_B type arguments by reference.
- Now configure the deployment target based on the  
–macosx-deployment-target parameter passed to install.rb config.
- Fixed a bug in [-setValue:forUndefinedKey:] to not insert nil values  
in the cache dictionary.
- Introduced a new config phase variable, ‘build-as-embeddable’,  
turned on by default, which builds RubyCocoa.framework with an  
INSTALL\_PATH set to  
@executable\_path/…/Frameworks/RubyCocoa.framework/RubyCocoa. When  
turned off, INSTALL\_PATH will get an absolute path value (the value of  
the ‘frameworks’ config phase variable).
- Fixed some bugs when messaging Ruby from Objective-C. Fixed a bug  
when the Ruby proxy cannot be determined, and another when OSX methods  
couldn’t be called directly on an Objective-C class from Ruby  
(DirectOverride).
- Do not allow pointers arguments that don’t have an ‘out’ type  
modifier to be omitted.
- Ignore the ‘Nil’ Foundation enumeration.
- Better behavior for C-array like arguments with a length argument.  
Do not emit a warning anymore if a value is passed for the length  
argument. If the value is either negative or greater than the size of  
the given array, raise an exception. Otherwise, just pass the value.
- OSX.objc\_symbol\_to\_obj has been obsoleted.
- Added support to decode structure fields of the union type.
- Properly handle exceptions NSGetSizeAndAlignment could throw.
- Increased the method encoding buffer when analyzing its arguments.

---

<div class="post-metadata">

**Author:** ![Laurent\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/65b543/32.png) [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Post date:** [May 23, 2007, 12:52am UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809/2 "2007-05-23T00:52:44Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Only today I was thinking of porting my latest piece of Ruby software to  
OS  
X, and wondering whether something like this existed.

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFGU3QN2vy7v+d+psQRAud7AJ9AJmmJwBQk1GXr4knBCKNlHVRaJQCg1woM  
Ux9cbnmIHAb5bjEg7zo168I=  
=wnPu  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Laurent\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/65b543/32.png) [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Post date:** [May 23, 2007, 12:29pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809/3 "2007-05-23T12:29:37Z")

</div>

Hi,

I see on your GettingStarted page this requires OS X 10.4.8, but I’m  
still using Panther (10.3.9). Could you tell me which branch in CVS  
is the last to run on Panther?

---

<div class="post-metadata">

**Author:** ![Laurent\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/65b543/32.png) [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Post date:** [May 23, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809/4 "2007-05-23T15:00:05Z")

</div>

Hi,

On 5/23/07, Erwin A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,
> 
> I see on your GettingStarted page this requires OS X 10.4.8, but I’m  
> still using Panther (10.3.9). Could you tell me which branch in CVS  
> is the last to run on Panther?

In fact you may be able to build the source release on Panther, though  
I haven’t test this yet. The only requirement would be libxml2 (which  
is bundled since Tiger).

Please contact us if you encounter problems.

Laurent

---

<div class="post-metadata">

**Author:** ![Laurent\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/65b543/32.png) [@Laurent\_S](https://www.ruby-forum.com/u/Laurent_S)\
**Post date:** [May 24, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/rubycocoa-0-11-0/104809/5 "2007-05-24T12:56:08Z")

</div>

On May 22, 2:35 pm, “Laurent S.”  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I am honored to announce the immediate release of RubyCocoa 0.11.0.

This is great news, and from the looks of it, a great release. Thanks  
for your hard work. I look forward to exploring what’s new this  
weekend.
