Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > [ANN] RubyCocoa 0.13.0

Reply
Thread Tools

[ANN] RubyCocoa 0.13.0

 
 
Laurent Sansonetti
Guest
Posts: n/a
 
      11-24-2007
Hi,

I am honored to announce the immediate release of RubyCocoa 0.13.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 website:

http://rubycocoa.sf.net

A source tarball as well as binary installers for Mac OS X 10.4 and
10.5 are provided.

This is mostly a bugs fix release, addressing many critical issues,
but it also brings some nice enhancements. All users are encouraged to
upgrade, and report us feedback.

Mac OS X 10.5, Leopard, is as you can see supported by this release.
Installing this release using the binary installer or manually with
the default build parameters won't override the system version, it
will go in /Library while the system version is in /System.

The release notes are following. Enjoy!

Laurent

New features:

- NSArray and NSDictionary now respond to the same messages of their
Ruby equivalents, respectively Array and Hash. NSString responds to
the String messages too, except #=~ and #match. The implementation is
fast and reliable, but respects the Cocoa semantics. The
#method_missing hack has been removed.

- Added utility methods to NSRect, NSPoint, NSSize and NSRange.

- Added useful inspect methods to NSString, NSNumber, NSArray,
NSDictionary, NSCFBoolean and NSDate. Added pretty print support to
NSString, NSArray, NSDictionary.

- Added a #to_ns method to Array, Hash, String, Numeric, TrueClass,
FalseClass, Time, to convert them to their Cocoa equivalent.

- Added ObjcPtr#cast_as(encoding) for more generic casting from void*.

- Added Leopard-only samples.

Bugs fixed:

- Fixed various memory leaks in the RubyCocoa initialization code, and
in the bridge support parsing code. No memory should now be leaked
during initialization.

- Improved the ruby obj -> ocid and ruby obj -> SEL conversions performance.

- Fixed a crash when passing a pointer to an ObjC object, then trying
to convert it as a Ruby object after the API call, but crashing
because the pointer wasn't touched by the API. Now preparing
passed-by-reference pointers to NULL.

- Fixed an error, "Please install again" on reinstalling using the
binary installer.

- Do not translate 'set' methods that get more than one argument.

- Create the slave objects at demand, if they do not exist yet. This
fixes a bindings / CoreData problem in 10.5.

- Now resetting the context autorelease pools on every thread restore.

- Fixed a bug when an object that was being allocated from a Ruby
thread was still in the cache while the thread was killed, resulting
in a corrupted cache.

- Make sure we do not cache CF-based objects.

- Fixed a circular retain cycle from ObjC objects allocated from an
NSObject-based Ruby class, resulting in a leak of both the ObjC object
and its Ruby proxy.

- Hook [copyWithZone:] and reset the slave object so that every ObjC
object has a different slave object. This fixes a crash when releasing
a slave object that could be shared by multiple ObjC objects.

- #objc_send will now pass a frozen selector to the core, where
underscore characters won't be transformed as ':'. This is a
convenience utility to call ObjC methods that contain underscores as
part of their selector, like for example [__rbobj__].

- Better OvMix retain cycle: if an OvMix object is created from Ruby,
we by default don't retain its Ruby proxy, and start tracking
retain/release messages, and appropriately re-retain/re-release the
Ruby proxy.

- Removed the old __slave_nsobj__ ivar hook. Now all pure-Ruby objects
will be wrapped in an autoreleased RBObject.

- Fixed a bug, when ObjC arguments that were passed from an ObjC
closure to Ruby were not retained, as they should. Added a test case.

- Better facility (10.5 only) that dispatches messages from threads to
the thread where RubyCocoa was initialized. It was previously assuming
that RubyCocoa was run in the main thread, which may not be always
true (Ruby could be ran in a different thread).

- Now allow the send the of 'new' message to any ObjC class that will
respond to it. Keep the old behavior (raising an exception) for
classes that don't implement new.

- Added threading support for 10.5.

- Updated metaconfig and Rakefile to use '--gen-bridge-support=no' on 10.5.

- New metaconfig option --sdkroot. Fix setup error
--macosx-deployment-target=10.4 on 10.5.

- Fixed String#to_nsstring for 10.5.

- String#nsenconding, to_nsstring, to_nsmutablestring are now
deprecated. Developers are encouraged to switch to #to_ns.

- Fixed a bug, calling to_ns for a Ruby String which has illegal utf-8
sequences caused a bus error.

- Avoid an infinite loop when creating the slave proxy, which could be
caused by an attempt to pass an object to Objective-C in its
#initialize method.

- sample/Scripts/darkroom.rb: fix SEGV of darkroom.rb on 10.5.

- Added CoreData.define_wrapper_for_entity(). This feature was part of
CoreData.define_wrapper(). Removed "to_a" for NSArray in CoreData
module.

- Load the libSystem.bridgesupport file if it exists (10.5 only).

- rb_nibtool: Fixed a crash when the provided Ruby script only defines
actions but no outlets, or vice-versa.

- rb_nibtool: Fixed bug where #each was called on nil if there were
either no actions OR outlets in the class.

- rb_nibtool: Fixed bug where a new class from a source file would not
show up in the class list in IB because the superclass is unknown to
the classes list in IB. If the superclass const is not found it will
default to NSObject. This change is not effective when rb_nibtool is
used with rubynode.

- rb_nibtool: Fixed problem when not detecting existing classes.

- standaloneify: Now sets the environment variable
ENV['RUBYCOCOA_STANDALONEIFYING?']. This is to be able to prevent code
from being ran when an application is being standaloneified.

- standaloneify: Will now skip all the source files at any depth in Resources.

- gen_bridge_doc: Updated to work with the latest Apple documentation and 10.5.

- gen_bridge_doc: Fixed a bug where </i> tags weren't replaced by '_'.

- gen_bridge_doc: Added documentation for the translated bool methods,
eg: isRunning -> running?.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[RubyCocoa] Cocoa Bindings? (cont.) Harry Ruby 2 07-08-2004 06:38 AM
Cocoa Controller Layer and RubyCocoa? Harry Ruby 0 06-22-2004 09:19 AM
Ruby 1.8.1 on OS X Panther and RubyCocoa Phil Tomson Ruby 8 03-06-2004 11:21 PM
RubyCocoa problem:multiple definitions of _rb_obj_clone Phil Tomson Ruby 1 03-05-2004 10:33 AM
RubyCocoa 0.4.0 path [?] Issue Stephyn Butcher Ruby 1 07-11-2003 06:55 AM



Advertisments