MacRuby Changelog

What's new in MacRuby 0.10

Apr 8, 2011
  • Highlights:
  • Support for the new MacBook Pro hardware (SandyBridge processors).
  • Fixes in macruby_deploy for App Store submissions.
  • Xcode4 support.
  • Minor stability fixes.
  • Changes:
  • Fixed a bug where we would crash when protecting an internal call during an exception raise.
  • Fixed a bug in the BridgeSupport parser when loading IOKit, which contains very large structures.
  • Fixed a bug in IO#try_convert to properly raise a TypeError exception when passed a wrong object.
  • Fixed a regexp bug in the URI library to avoid a backtrace explosion.
  • Fixed a bug in String#+ where non-string objects could be concatenated.
  • Fixed a bug when break expressions inside hash iterations wouldn't be taken into account.
  • Fixed a bug in Array#fill(start, length) where passing a huge length would cause a crash.
  • Fixed various minor CRuby conformance bugs in Array.
  • Implemented the Hash#{keep_if, select!} methods.
  • Implemented the Set#{keep_if, select!} methods.
  • Fixed a bug in the ostruct library where regexp global variables would be overriden.
  • Fixed a bug in macruby_deploy when passing --embed, to change the libmacruby dyld identification name, to conform to App Store submission rules.
  • Fixed a bug in macruby_deploy when using --gem on gems containing a space character in their paths would break the deployment.
  • Fixed a race condition crash in Thread#kill.
  • Fixed a bug when compiling recursive method calls when methods actually re-define themselves on the fly (this fixes the mustache library).
  • Moved to LLVM 2.9.
  • Fixed a bug where converting a NULL pointer as an opaque type value to Ruby would not give nil (as in RubyCocoa).
  • Fixed a bug in Hash#[]= to not duplicate a String key that is already frozen.
  • Tickets:
  • #1184: Bus Error occurs since r5265.
  • #1186: macirb segfaults when trying to tab complete an NSURL object
  • #1166: Segfaults occurs when was passed NULL pointer into rb_protect's 3rd argument.
  • #794: `pthread_mutex_unlock(&t->sleep_mutex)' failed: Invalid argument (22)
  • #734: Mustache fails on call to render.
  • #1177: Hash.each doesn't exit on embedded return
  • #1171: `macruby_deploy --gem` problem with directories that have a space
  • #1179: OpenStruct overwrites regex globals seriously breaks Rack/Sinatra
  • #1178: Mac App Store reviewers rejecting MacRuby app's due to library name
  • #1185: LLVM error running 1.9 distribution on Sandy Bridge
  • #1191: Assertion failed with define_method.
  • #1194: launch_msg(LAUNCH_KEY_CHECKIN) doesn't return nil when run outside of a daemon/agent

New in MacRuby 0.9 (Feb 26, 2011)

  • Highlights:
  • Lots of stability fixes (crashers, memory leaks and race conditions), and a few performance improvements.
  • The internal representation of Strings changed from a dual binary / UTF-16 model to a pure binary one, principally to avoid problems in multithreaded applications. Performance should remain the same in most cases.
  • The macruby_deploy program has been enhanced to embed RubyGems (with dependencies) and BridgeSupport files. See the new respective --gem and --bs options.
  • The libmacruby-static.a library is not built by default anymore, because static compilation is still a work in progress.
  • Upgraded to RubyGems 1.4.2.
  • Changes:
  • Fix a bug in IO.open() where numeric file descriptors could not be passed as the first argument.
  • Fix an assertion that could happen when calling #methods & friends on a class that contains a method name larger than 100 characters.
  • Fix a bug in IO.open() where the given path would not be handled as a path (calling #to_path if necessary).
  • Fix a bug in the YAML extension where yajl_free() would be called on a NULL pointer.
  • Fix a bug in the OpenSSL extension, when calling ossl_pkey_sign().
  • Fix a bug where calling a method defined with #define_method with a block accepting a splat argument (arity -2) would crash.
  • Fix Ruby warnings in the YAML extension.
  • Fix a bug when some splat methods defined with #define_method() would segfault at dispatch time.
  • Improve the internal rb_eql() routine for performance, makes faster hash lookup / keys comparison operations.
  • Improve the hashing function for Arrays.
  • Move the conformsToProtocol: and performSelector: default logic on direct pure-Ruby subclasses.
  • Fix a bug in IO#close_write where IOError would not be thrown if the stream was readable and non-duplex.
  • Fix a bug in IO#write where an exception would be raised if the stream was read-only when writing 0 bytes of data.
  • Fix a bug in Kernel.require where a file path starting with '~' would not be loaded.
  • Fix a bug in String#gsub! where we would segfault during string concatenation.
  • Fix a bug in the compilation of scopes where the current_block_arg state variable wouldn't be re-entrant (this fixes the compilation of the mechanize library).
  • Fix bugs in String#inspect when called on a string that contains invalid and non-BMP characters.
  • Fix a potential memory crasher in String#sub and String#gsub where free'd memory would be reused.
  • Fix a bug where $FILENAME, $* and $-W could be changed.
  • Fix a bunch of bugs in Array methods where SecurityError would not be raised when $SAFE is 4.
  • Fix a bug in Kernel#untrust where an exception would not be raised on a frozen object.
  • Fix a bug in Kernel#trust where an exception would not be raised on a frozen object.
  • Fix a bug in Kernel#trust where an exception would not be raised if $SAFE is equal or greater than 3.
  • Fix a crash in Rational#rationalize due to registering the method with a wrong arity.
  • Fix a bug when we would free outer memory but still keep outers pointing to that memory location, causing crashes later during const lookup (this fixes rspec).
  • Fix a bug in Struct#hash when called on recursive structs.
  • Fix a bug in Array#== when called with recursive arrays.
  • Fix a bug in StringIO#puts when called with recursive arrays.
  • Fix a bug in Exception#== when an infinite loop would be entered when comparing exceptions from different classes.
  • Fix a bug when #initialize_copy would not raise an exception when called on Object or BasicObject.
  • Add support for encodings ISO8859_{2..16}.
  • Fix a bug in String#search_codepoint where breaks were ignored.
  • Fix a bug in OpenSSL::BN#to_s.
  • Fix a bug in OpenSSL::PKey::DH#compute_key.
  • Fix a bug in OpenSSL::X509::Attribute#to_der.
  • Fix a bug in OpenSSL::PKCS5.pbkdf2_hmac(_sha1).
  • Fix a bug in OpenSSL::PKey::DSA#syssign.
  • Fix a bug in OpenSSL's ossl_x509store_initialize() function where an internal value would not properly be initialized.
  • Fix a bunch of bugs in Array methods where an exception would not be raised when passing very large indexes or ranges.
  • Fix a bug in Array#inspect where an untrusted string would not be returned.
  • Fix a bug in String#unpack when called with a block.
  • Add support for variadic objc method dispatch in the parser.
  • Fix a bug in Socket.pair where the sockets would not be yielded when passing a block.
  • Fix a bug in Socket.pair(domain, type, protocol) and Socket.new(domain, type, protocol) where protocol would not be an optional argument.
  • Fix a bug in Socket.getservbyport(port) where a port outside the uint16 range would be accepted.
  • Fix a bug in Socket.getservbyport where the network byte order value would not be passed to the underlying API.
  • Fix a memory leak and potential crasher in Regexp's internal rb_reg_matcher_new() function.
  • Fix various memory leaks and potential crashers in code paths that require binary -> UTF-16 conversions.
  • Fix a bug in OpenSSL::BN#prime?.
  • Add the #size class method on BridgeSupport struct classes. Example, NSRect#size returns the same as sizeof(NSRect) in C.
  • Fix a bug in OpenSSL::SSL::SSLSocket#cert.
  • Fix -[MacRuby evaluateFileAtPath:] to behave like #require, so that it can also handle .rbo or .bundle files.
  • Fix a bug when sending KVO notifications on immediate objects would cause a crash.
  • Cleaned out all public header files.
  • Fix a bug in Sandbox.new where passing a non-String object would cause a crash.
  • Add rb_str_plus() CRuby API.
  • Fix a bug in {Thread,ThreadGroup,Mutex}#alloc where we would not return objects from the current class (could be a subclass).
  • Fix a bug in Kernel#public_method where an exception would not be raised when called without public methods.
  • Fix bugs in Module#{remove_method,undef_method,public} to honor untrusted state.
  • Add Pointer.magic_cookie to create pointers with arbitrary values (must fit in a long). Example: Pointer.magic_cookie(42).
  • Fix a bug in Module#method_defined? where false would not be returned was passed the name of private method.
  • Fix the compilation of C blocks to not use a global variable to store/load the Proc object to call, but instead retrieve a reference to it from the block literal argument. This fixes nested C blocks.
  • Fix a bug in Kernel# will 0 would not be returned when receiver's == return true.
  • Fix a bug in Module#public_method_defined? where true would not be returned when was passed name/symbol of public method.
  • Fix a bug in Array#pack with format "fFeEdDgG" to raise a TypeError when does not convert into float.
  • Fix bugs in #sprintf when passing the following formats: "%# x", "0.4f", "0.4u".
  • Fix a bug in String#unpack with format 'Q' to add add nil for each element requested beyond the end of the String.
  • Fix a bug in String#scan to return an Array object with each element tainted or untrusted when #scan returns nested arrays.
  • Fix a bug in Array#[]= to check frozen state before attempting to coerce arguments.
  • Fix a bug in String#initialize to raise a RuntimeError if self is frozen.
  • Fix a bunch of bugs detected by clang's link time optimization (LTO).
  • Fix a bug in -[NSArray ==:] and -[NSDictionary ==:] where a crash would occur if passed a Ruby immediate type.
  • Fix bugs in String#each_char and String#ord to now raise an exception if the String contain invalid characters.
  • Fix a bug in String#ord to return the byte value even if a it's not an ASCII character.
  • Fix a bug in the dispatcher where free'd memory would be accessed.
  • Fix a bug in #at_exit when the process would abort if a block raised an exception.
  • Fix a bug in Array#delete where we would check if the receiver can be modified *after* modifying it.
  • Fix a bug in Mutex and ThreadGroup where modifying internal array structures under SAFE level of 4 would raise an exception.
  • Fix a problem in #load: instead of crashing if we cannot locate the entry point of a .rbo file, raise an exception with a message explaining the most common problem cause instead.
  • Fix a bug in the compilation of the 'next' expression which would not honor ensure blocks.
  • Add support for #define_method when passing Method.
  • Fix a bug in StringScanner on multiline strings.
  • Fix a bug in macirb where a syntax error would exit the program.
  • Improve the performance of #pack with most flags by pre-allocating the result bytestring, to avoid too-much frequent memory reallocations.
  • Fix a 32-bit precision bug when converting Time objects to NSDate objects.
  • Allow Float objects to be trusted/untrusted and tainted/untainted.
  • Fix the default value of BasicSocket.do_not_reverse_lookup to be true.
  • Fix a bug in Thread.kill when passing a non-Thread object would cause a crash.
  • Fix calls to -[NSString fileSystemRepresentation] to catch potential exceptions.
  • Fix a bug in macruby_deploy with --embed where the main application's executable's link path would not be updated.
  • Fix a bug in macruby_deploy with --embed to now delete the Current symlink as it seems to cause the AppStore validation process to fail.
  • Add the Errno.code method to return the current errno value.
  • Fix a race condition bug when generating internal class names where concurrent access would cause runtime problems.
  • Add missing CRuby API rb_thread_blocking_region().
  • Fix a race condition bug when spawning a new VM instance and copying the current VM dispatch cache.
  • Fix a memory leak when resolving JIT methods.
  • Fix a race condition bug when dispatching and resolving a method at the same time.
  • Fix lexical const lookup bugs inside modules defined using the :: notation.
  • Fix const lookup calls to include necessary DWARF metadata, in order for #const_missing calls to appear in backtraces later at runtime.
  • Change the framework's bundle identifier to use macruby.org instead of apple.com.
  • Tickets closed:
  • #1155: Embed BridgeSupport Files
  • #1067: Segfault occurs when calls Struct#hash with recursive structs.
  • #1116: Yet another String performance issue
  • #1122: Inspection of NSArray stops at unicode char
  • #1134: The new code for next/ensure does not work properly
  • #1133: Silly syntax error crashes macirb
  • #1124: string.ord returns 0xFFFF for all characters 0x80 or greater in binary string
  • #1075: rdoc is way too slow as of r5059
  • #1160: Need ability to access errno from Ruby code
  • #1055: running RSpec with MacRuby 0.9 r5038 and greater causes seg. fault
  • #1070: rspec2 segfaults when I try to run it
  • #1136: Array#pack performance w/ base64 strings
  • #1087: Assertion fails when Array#[]= was specified with very large index.
  • #1143: Dates in 32-bit converted from NSDate are not precise enough
  • #1142: Array#pack performance while converting array of ASCII values to string
  • #1137: macruby_deploy should automate gems embedding
  • #1083: Segfault occurs when calls the String#unpack('i') with block.
  • #1054: Assertion failed. "(arity >= 0), function compile_block_caller"
  • #1040: Dalli test suite crashes
  • #1088: Performance: String#* is very slow.
  • #1039: Bundler fails with TypeError: can't convert Pathname into String
  • #1076: Abort occurs when raise a SecurityError within Thread.
  • #1074: Abort occurs when install the rubygems.
  • #1078: segfault when trying to use macgem to install a gem
  • #1092: Unable to Update MacRuby Gems
  • #1127: Access to freed memory in rb_vm_dispatch
  • #868: Should not get a value until calling Hash#rehash when Object of Hash's key was changed.
  • #1080: Add #size method for C struct classes
  • #1043: Cocoa Binding broken
  • #1045: restclient gem fails when trying to GET
  • #1081: API function for loading RBO files from Objective-C environment
  • #1105: upgrade to rubygems 1.4.2
  • #1106: #initialize is not called in class which inherit Mutex.
  • #1107: Need to implement rb_str_plus.
  • #1047: Clean up warnings when installing gems
  • #1009: Can't set status of taint and untrust to Float Object.
  • #1132: Reopening a class modifies it
  • #1050: Segfault occurs with Rake::namespace.
  • #766: macrake overrides /usr/bin/rake
  • #1125: case insensitive fs require bug
  • #1109: Installing a gem from disk fails
  • #1051: Segfault occurs with RDoc::Parser::Ruby.
  • #1034: Requiring Mechanize gives segmentation fault
  • #1123: does not process the "ensure" when called the "next".
  • #1112: Allowing pointers to be created and initialised directly with an integer
  • #1121: Assertion failed: (boundaries.start_offset_in_bytes

New in MacRuby 0.8 (Dec 18, 2010)

  • Changes:
  • Fix a bug in Digest.digest and Digest.hexdigest when passing the algorithm name.
  • Fix a bug in Date when not using nsec in substitution for subsec.
  • Fix a bug in Date.httpdate when an exception "undefined method `size' for nil:NilClass'" was raised.
  • Fix a bug in #define_method when passed an objc-style selector.
  • Implement rb_str_modify() MRI API.
  • Fix a bug in the compiler when converting invoke instructions to call, where debugging metadata would not be properly transfered.
  • Fix a bug in -[NSArray ==:], make sure it returns false in case the receiver isn't an NSArray, instead of raising an exception.
  • Fix a bug in Benchmark::Tms#add! when a NameError would be raised.
  • Fix a bug in CMath.cbrt, when passed a negative value as argument.
  • Introduce Dispatch::Object which becomes the mother class of all Dispatch classes.
  • Introduce Dispatch::Object#dispatch_object which returns a raw pointer to the internal libdispatch type.
  • Fix a bug in BridgeSupport, by avoiding sanity pointer type comparison check in case the given pointer type is 'C'.
  • Fix missing connections in MacRuby Document-based Application template.
  • Fix a bug n String#split(sep, limit), when passed value to limit.
  • Introduce String#pointer which returns a Pointer object wrapping the string's internal storage.
  • Improve current algorithm to calculate line numbers in stack traces.
  • Fix a bug in BasicSocket#close_{read,write} where the actual fd would be left intact.
  • Fix a bug when creating a NameError exception where calling #inspect on the receiver object would raise an exception and cause an infinite loop.
  • Fix a bug in BasicSocket#close_{read,write} where we wouldn't raise an exception in case the stream was already closed
  • Fix a bug in BasicSocket#{listen,setsockopt} where we wouldn't raise an exception in case the stream was already closed
  • Fix a bug in StringIO#read(length). Should return empty string when specified 0 to length.
  • Fix a bug in StringIO#read(length, buffer). Should set empty string to buffer when calls at EOF.
  • Fix a bug in File#size. Should throw an IOError exception when calls with closed stream.
  • Fix a bug in the compilatin of #eval statements with Binding objects. When creating a binding, keep a reference to the top one.
  • Fix a bug in IO#sysread where it should throw an EOFError.
  • Fix a bug in IO#sysread(length). Should return empty string when specified 0 to length.
  • Implement rb_protect() and rb_jump_tag() MRI API.
  • Add a sample showing how to use CoreLocation to find the user's location and open it in a google map page using the default browser (Scripts/locator.rb).
  • Fix a bug in the super dispatch when we try to super call a method under the same selector as the current one but on a receiver from a totally different class hierarchy.
  • Improve +[MacRuby sharedRuntime] to make the load path relocatable in case MacRuby.framework is embedded in a .app.
  • Improve stack traces by now including yield statements. Attach DWARF metadata when compiling yield calls.
  • Fix a bug in Method#call where the method cache would not be used.
  • Implement rb_str_split() MRI API.
  • Implement rb_hash_tbl() MRI API.
  • Implement rb_global_variable() MRI API.
  • Implement rb_iterate() MRI API.
  • Remove Leopard hacks since it's not supported anymore.
  • Fix a bug in the compilation of bitfield types. Raise an exception in case the type string is invalid except of crashing the process (as we might be calling from Pointer.new).
  • Improve Pointer.new by supporting :boolean/:bool as a shortcut to 'B', and :selector/:sel as a shortcut to ':'.
  • Implement rb_gc_register_address() MRI API.
  • Introduce Pointer#+ and Pointer#- to allow the user to change the offset of a pointer (returning a new pointer object).
  • Change Pointer.new to only accept Symbols for type shortcuts.
  • Fix a bug in BridgeSupport by disabling a check when converting bignums into unsigned long longs as it may trigger false positives when using certain Cocoa APIs.
  • Fix a bug in the io.h header file, making sure it can be included without CoreFoundation.
  • Fix a bug in File.expand_path to not resolve symlinks.
  • Fix a bug in #methods and friends to not include unavailable (undefined, etc.) methods.
  • Implement rb_call_super() MRI API.
  • Implement rb_num_coerce_relop() MRI API.
  • Fix a bug in BigDecimal to throw exceptions when compared with nil.
  • Fix a bug in IO#gets(nil). Will return all data which was read from the stream.
  • Fix a bug in IO#gets(nil, limit). Will return data of limited length.
  • Implement rb_obj_instance_eval() MRI API.
  • Introduce Kernel#getpass method, which wraps the getpass(3) API.
  • Fix a bug in the compilation of var slots, where binding slots would be taken first before block dynamic slots.
  • Fix a parser bug by removing useless range literal optimization.
  • Fix a bug in IO#gets(limit). Will return nil when calls at EOF.
  • Fix a bug in IO#readlines(limit) when an infinite loop could be entered.
  • Fix a bug in IO#gets(0) to return empty string.
  • Fix a bug in IO#gets(sep, 0) to return empty string.
  • Update DietRB to 0.6.0 which adds auto-indentation and file path completion in strings.
  • Improve the compilation of converter routines, by now supporting C-style arrays ('[' ... ']' runtime type).
  • Fix a bug in IO.readlines, when the last element wasn't returned.
  • Fix a bug in BrigeSupport, when doing sanity pointer type check, ignore '=' characters in type signatures.
  • Fix bugs in IO#dup and IO#binmode. Will raise an IOError exception with the closed stream.
  • Fix warnings in BridgeSupport when poking for the __octype__ hidden boxed ivar.
  • Fix bugs in IO#close_{read,write} to not wait completion of child process.
  • Fix a bug in IO.popen to properly cononect the pipe into the stdin of the child process.
  • Implement pipeline support in IO.readlines.
  • Fix a bug in IO.read to close resources surely, in case an exception happens.
  • Fix various bugs in ARGF methods, #each_{line,byte,char}, #getc, #read, #readlines, #getbyte, #read{char,byte,line}, #chars, #lines, #bytes.
  • Fix a bug in the IO layer to dispatch a message to #write instead of calling the default method directly. This fixes bugs in Zlib::GzipWriter#putc, #print, #printf and #

New in MacRuby 0.7 (Oct 7, 2010)

  • Highlights:
  • Better Ruby compatibility. Better C extensions support. This release has about 90% of RubySpec coverage.
  • Better concurrency. Dispatch cache has been rewritten to be thread safe. Fixed several race conditions and deadlocks. MacRuby can now handle a significant number of concurrent HTTP requests through ControlTower. Fixes and improvements in the Dispatch library.
  • Better Cocoa support. Reduced runtime overhead, fixed minor problems and simplified the integration with Cocoa classes. C-style blocks are now supported in MacRuby, assuming you install the new BridgeSupport preview release. The sandbox(7) functionality is now exposed in the Sandbox class.
  • Better performance. MacRuby's kernel primitives are now pre-compiled into LLVM bitcode and inlined later into the module. Fixed minor performance regressions introduced in last release. Optimized codegen, instance variables and multiple assignments. In JIT mode, cold paths are now interpreted and not JIT compiled. Introduced a regression performance suite.
  • MacIRB has been rewritten from scratch. The new version (called DietRB) is lighter and better implemented. It should be compatible with the old IRB.
  • Started working on static Ruby compilation, which generates executable binaries embedding the MacRuby runtime, not making use of the JIT compiler or BridgeSupport runtime metadata. This is a work in progress and we intend to finish it in the next release.
  • Mac OS v10.5 (Leopard) is no longer supported. We require MacRuby users to upgrade to Snow Leopard.
  • Other changes:
  • Fixed clang/clang++ build.
  • Fixed a crash when trying to create a byte string out of an empty NSString.
  • Fixed a small typo in the compilation error message.
  • Fixed a bug when bridgesupport files for linked frameworks wouldn't be loaded.
  • Fixed a crash when calling #to_json on a symbol.
  • Fixed a bug in Method#call which would incorrectly change the safe level.
  • Now filtering the symbols we expose in the macruby dylib.
  • Avoid calling xmalloc() with a zero size (fixes several performance problems).
  • #sysread with a len argument must return a binary string, not UTF-8.
  • Allow Pointer objects of type 'c' to be passed as C-style char arrays.
  • Fixed a bug in NSString#== where an exception would occur if the operand cannot be converted as a string.
  • Got rid of the NSNumber glue, it's useless since NSNumbers are always converted.
  • In case we are in a .app with MacRuby.framework embedded inside, relocate the load paths accordingly.
  • Deal with numeric escapes in regexps.
  • Symbol#to_proc now generates a Proc that can accept a variable number of arguments.
  • Fixed minor bugs in symbol and enumeration.
  • Implemented of String#encode.
  • Fixed String#each_byte to return positive numbers.
  • Made NSObject#== and NSObject#eql? use -[NSObject isEqual:].
  • Fixed minor bugs in Array and implemented #rotate, #rotate!, #select!, #keep_if, #sort_by!.
  • More robust runtime signature parsing, by dynamically allocating the temporary buffer instead of using a static array (which might be too small when parsing big signatures like in CoreAudio).
  • Be careful when compiling the struct #new method, some fields might be large (ABI-wise) structures.
  • Fixed minor bugs in Dir, implemented #home.
  • Create symbols from the auto zone, allowing associative references to work without emitting warnings/errors.
  • Fixed minor bugs in Enumerable and implemented #flat_map, #collect_concat, #each_entry, #each_slice, #each_cons, #each_with_object.
  • Fixed a bug in the compilation of the alias keyword, some arguments can be interpolated symbols (not literals).
  • Removed the sigbus/sigsegv signal handlers, let macruby crash immediately to make the life of crashtracer easier.
  • Fixed minor bugs in Enumerator and implemented #each_with_object, #with_object.
  • Fixed minor bugs in File and implemented #absolute_path and #size.
  • Backported latest net/http from ruby trunk.
  • Fixed minor bugs in Fixnum and implemented #magnitude.
  • Fixed minor bugs in Float and implemented #rationalize.
  • Added some missing MRI C-APIs.
  • Added support for the nkf extension.
  • Fixed a bug when popping exceptions from compiled code.
  • Fixed minor bugs in the GC module.
  • Made the division of negative fixnums behave like MRI.
  • Fixed minor bugs in Math.
  • Fixed #define_method with a Proc to compile a stub with the same arity as the block.
  • Cleaned up public headers.
  • Simplified the Core Data Xcode template.
  • Better ivar slot system for RubyObject + misc fixes/cleanup.
  • Introduced the VM_VERIFY_IR environment variable to force a LLVM module verification. Made sure the RubySpec suite runs with no verification error.
  • Webrick bug fixes.
  • Follow API changes in LLVM.
  • Define the encoding constants in upper case, also.
  • Some of the VM primitives are not precompiled into bitcode and later inlined.
  • Reduced usage of std::vector.
  • New sample code: Suru, a to-do list app that uses Core Data for storage.
  • Fixed a bug when rbconfig.rb would not honor ARCH_FLAG.
  • Don't recognize ^v as a CF type + misc cleanup.
  • A more efficient class flags mechanism.
  • Reduced the number of default slots in RubyObjects to 4.
  • rake now accepts optional CC and CXX variable to setup custom compilers. To compile with clang, use rake CC=clang CXX=clang++.
  • Fixed a bug in IO#read when the given buffer wouldn't be truncated.
  • Don't temporarily disable the collector when booting the runtime.
  • Do not raise ArgumentError in the case where the method has been undefined.
  • Implemented String#each_codepoint and String#codepoints.
  • macrubyc: when linking a final executable, also link against Foundation and libauto since some of their symbols can now be inlined.
  • Set the actual backtrace to Obj-C exceptions, instead of an empty array.
  • Per-vm method cache + misc fixes/improvements.
  • Fixed the return value of NSArray#reject.
  • Ruby strings now respond to #to_data which returns an NSData object wrapping the internal storage.
  • Implemented File#realpath and File#readdirpath.
  • Implemented IO#sysread (unbuffered reading).
  • Ruby version is now set to 1.9.2.
  • Do not run node if node is not executable.
  • Do not allow creation of pointer to "v".
  • Removed usage of autozone weak references.
  • macrubyc: always link using the current macruby's libdir.
  • Allow reserved keywords to be used as function keyword arguments.
  • Removed usage of RTTI.
  • macrubyc: now strip symbols from binaries.
  • Strip symbols from shared and static library during install.
  • Fixed minor encoding bugs in net/protocol and resolv.
  • Fixed a bug in IO#sysread to make sure the buffer is properly resized.
  • Don't instantiate the JIT when running in AOT mode.
  • Honor the target triple from the deserialized kernel module
  • Expose the VM_KERNEL_PATH variable to specify a kernel bitcode file.
  • When the default -description is called, avoid calling #to_s on the object if the implementation is the same.
  • Fixes using ruby Array methods on SBElementArray objects.
  • Create all functions with internal linkage since the super dispatcher no longer requires external symbols.
  • AOT: when preparing methods, also pre-compile objc stubs (currently, only generic ones).
  • Added Object#to_plist and Kernel#load_plist for property list manipulation.
  • Fixed bugs in open3 lib and Process.spawn.
  • Time now inherits from NSDate.
  • Before acquiring the core lock when resolving a method, make sure the VM object has been created/registered, since it might be needed when adding the method and if called by a foreign thread it might cause a deadlock.
  • Fixed the compilation of while loops with empty bodies (ex: '() while 1').
  • C extension Ruby files are now pre-compiled during build.
  • +[MacRuby sharedRuntime]: don't forget to init the JIT!
  • When creating a regex matcher, don't crash if there is no capture.
  • macrubyc: added --sdk option (work in progress).
  • Fixed build on 10.5. But it's no longer supported, so don't use it.
  • Reduce/restore safe level when formatting an exception (since it may taint objects).
  • Fixed bignum promotion when multiplying fixnums.
  • Don't crash when trying to deal with constants whose symbols cannot be located or constants tagged as magic cookies.
  • Added support for splat when clauses inside empty-case statements (don't ask me why).
  • Make sure Bignum#modulo uses the implementation function.
  • Fixed a minor bug in ENV#rassoc.
  • Added support for comparison of recursive structs.
  • Fixed a bug in IO#gets.
  • When preparing a block, make sure to write barrier the reference to self.
  • Always return 'main' as the top level object description.
  • String#gsub with block: don't check for receiver mutable state.
  • Removed Array#nitems and fixed Array#count for empty arrays.
  • Thread#join: when timeout is provided, make sure to do multiple sleeps and return appropriately if the given thread has finished.
  • Fixed #marshal_load for non-array arguments.
  • Fixed bugs in the NSString forwarding methods.
  • Implement Socket#sendfile.
  • Fixed many crash bugs discovered by fuzzing.
  • Added a Sandbox class that adds sandbox(7) functionality.
  • Implement #remove_instance_variable for RubyObjects.
  • Fixed #remove_instance_variable for native objects.
  • Fixed several bugs in the BridgeSupport parser to make it read the files created by the new generator.
  • Lots of openssl bug fixes.
  • New sample code: Sketch, a MacRuby port of the existing Objective-C application.
  • Added basic support to define/message ignored selectors (retain & friends).
  • Fixed the compilation of store instructions to not be compiled as volatile, allowing further optimizations.
  • Fixed a crash when yielding a block inside a loop in a thread.
  • Fixed a bug in Method#== where it wouldn't work on pure objc methods.
  • Honor the original string encoding when generating substrings out of a regexp matcher.
  • When unregistering a thread, mark is as dead very early to avoid pthread mutex lock problems when potentially canceling it later.
  • Raise an exception in case we try to stop the only running thread.
  • Fixed many zlib bugs/crashes.
  • #instance_eval: don't attempt to create singleton classes on symbols.
  • Fixed a compiler bug where it would assume that the argument of the undef keyword would always be a literal symbol.
  • Honor bridgesupport metadata when calculating the default objc signature of a new method.
  • Better C implemention of iconv.
  • Make sure rake won't overload -copy.
  • When trying to convert a string into a numeric type, raise an exception in case the string encoding isn't ASCII incompatible.
  • Mutex#try_unlock: Add the mutex to the current thread mutexes on success.
  • Fixed a 1.9 bug in File.basename.
  • Fixed marshal load of large integers.
  • Fixed a bug when string-formatting numeric types.
  • Don't attempt to #load directories.
  • When killing the main thread, just exit the program.
  • Fixed a bug in File.extname.
  • Rewrote the regexp layer in pure C to avoid binary incompatibility issues with ICU.
  • +[MacRuby sharedRuntime]: initialize the load path.
  • pack(U) should set an encoding of UTF-8.
  • String#strip: don't strip non-ASCII whitespaces.
  • Fixed #flatten not setting untrust state.
  • Properly reap child processes before closing their IO objects.
  • Hash#to_a: transfer untrusted status to the new array.
  • Honor ThreadGroup frozen state.
  • Don't allow a Thread object to be initialized twice.
  • Avoid mutual recursion while setting outers.
  • Merge webrick security fix from 10.6 SU.
  • Fixed a bug in the BridgeSupport parser when dealing with circular dependencies + minor bug fixes.
  • Fixed multiple AOT feature #requires.
  • Fixed a memory leak in the BridgeSupport parser.
  • Fixed String#sum to accept bits argument greater than 64.
  • macrubyc: now accept more linker options: --compatibility_version, --current_version and --install_name.
  • #sprintf: don't try to mutate symbols.
  • Optimized IO read_all.
  • Fixed alignment bugs in the GCD layer.
  • Dir.tmpdir: returns NSTemporaryDirectory() in last resort and not /tmp.
  • Re-cache Obj-C variadic calls when argc is different than cached.
  • macgem now asks confirmation before overriding binaries w/ different shebang.
  • When a GCD block exits because of an uncaught exception, write a message on stderr.
  • When a thread exits prematurely because of an exception, write a message on stderr once the thread object is being finalized only if #join was never called.
  • Range#each: make sure break works in all cases.
  • Fixed reentrance bugs in #load & friends.
  • Synced bigdecimal extension with upstream code + fix some crashers (heap/stack corruption).
  • Don't crash when using defined?(super) out of a method block.
  • BridgeSupport parser: in 32-bit mode, ignore elements having only type64 attributes.
  • Let's complain when trying to resize a string with a negative capacity like MRI does.
  • Don't raise an exception when comparing an NSDictionary with a non-one.
  • No longer install digest.h.
  • Issue write barriers when storing objects into Binding slots (this should fix most of the macirb crashers).
  • Fixed a bug in the super dispatcher: in case we can't locate the receiver's class in the ancestors chain, because it may have been extended, let's assume the super method will be in the direct superclass instead.
  • #require: forget about the current binding during parsing.
  • Rewrote AOT .rbo files loading mechanism: now using a callback routine instead of calling directly the main scope from the dylib constructor, since the dyld trampoline will not properly forward C++ exceptions.
  • Added 2 new sample code scripts: javascript.rb and webrick.rb.
  • Fixed a bug when changing a method's visibility to public would not be taken into account.
  • Don't invalidate respond_to and dispatch caches while we are still booting the runtime.
  • When calculating a backtrace path from a -e script, omit the current directory.
  • File.unlink: rewrote so that the arguments aren't wrapped inside an array anymore, to avoid a resurrection error in lib/tempfile.rb.
  • Fixed a silly bug in String#setbyte.
  • macrubyc: disable frame pointer elimination optimization because it will mess up with the backtracing routine which walks through the stack.
  • Added basic support for __method__ and __callee__.

New in MacRuby 0.6 (Jun 14, 2010)

  • Highlights:
  • MacRuby is now stable for Cocoa development.
  • Debugging support in both the compiler & the VM (experimental). Introduced macrubyd as a command-line tool to pilot the debugger.
  • New Hash class. Honors insertion ordering, optimized for Ruby immediate types.
  • New String class. Supports the Ruby 1.9 encoding semantics and can also hold binary data. Removed the old hidden ByteString class. Symbol has also been rewritten to support multibyte characters.
  • New Regexp class. Thread-safe, based on the ICU framework. Oniguruma is no longer used.
  • Additional, higher-level abstractions and convenience APIs for GCD, such as the Job and Proxy classes, via the "dispatch" library.
  • Support for C extensions written for MRI (experimental).
  • Rewrote the Foundation built-in classes glue to conform better to the Ruby semantics and be more robust in the future. A lot of unused code was then deleted.
  • About 85% of global RubySpecs pass rate.
  • Other Changes:
  • Fixed a bug in #caller to remove itself from the backtrace.
  • Make sure #at_exit blocks are called within exception handlers.
  • yaml: implement YamlNode.
  • Fixed a bug in File.open to handle given path argument as a path and not a string.
  • Fixed a constant lookup bug inside Foo::bar modules.
  • Fixed a constant lookup bug inside #instance_eval.
  • Fixed a deadlock when autoloading constants.
  • Fixed a GC bug when passing thread-local objects to a new thread.
  • RubyGems was updated to 1.3.6.
  • Better signal handling support.
  • Make sure Fixnum and Float boxes honor -copyWithZone:.
  • Fixed a bug in #autoload from a mixed module.
  • Register not implemented methods with rb_f_notimplement().
  • Properly pop exceptions from the VM stack when we unwind from a handler.
  • Added support for blocks symbolication.
  • Make sure to catch Exception-based exceptions when requiring a file.
  • Changed generic/native/class instance variables to use GC associative references and keep the global hash for immediates.
  • Introduce RubyObject, a hidden class used as the basic class of all ruby-created classes.
  • Fixed an infinite loop in Object#freeze that only occurs at SAFE level 4.
  • #respond_to? now returns false in case the method is not implemented.
  • GC.count is no longer implemented.
  • Added support for the flip-flop operator.
  • macruby_deploy: make sure .rbo files are properly linked when MacRuby is embedded into an app.
  • Added encoding-related exceptions.
  • Fixed #flatten on NSArrays.
  • Get rid of bad alloca() calls to avoid stack corruption.
  • Disable frame pointer elimination optimization in the JIT.
  • Simplified constant lookup primitives.
  • Removed an old limitation of 32-bit MacRuby being unable to load .rbo files.
  • Don't always assume that a thread has a group.
  • Array#sample: raise an exception if given count is negative.
  • When doing an assignment from thread X to thread Y's stack, defeat the thread-local collector by making X leave the ownership of the object.
  • BasicObject#initialize: do not forward -init in case it's a ruby method.
  • Added support for methods defined for the MRI ABI (using rb_define_method & friends).
  • Class#clone and Module#clone: now copying methods and constants.
  • Class#instance_methods and Module#instance_methods: do not include the superclass methods.
  • Rewrote the String formatting code to no longer be a stub of CFString.
  • Removed the testrb and erb executables.
  • Inspect message should always start by a #.
  • Hash#compare_by_identity, #compare_by_identity?, #default_proc=: added.
  • Hash#dup: fixed to honor subclasses.
  • Hash#[]=: fixed to duplicate and freeze string keys.
  • Fixed some freeze/taint problems with immediates.
  • Kernel.Integer: upgraded to 1.9.
  • yaml: Don't break :inline structures at 80 column boundaries.
  • Integrate Mersenne Twister based random number generator from 1.9 upstream.
  • Kernel#respond_to_missing?: added.
  • Kernel#caller: now honor the skip argument.
  • Hash#clone: keep singleton classes.
  • Array#join: convert separator as string.
  • Array#: return nil if given obj is not array.
  • Array#dup/#clone: appropriately handle singleton classes.
  • When calling method missing, don't assume #method: takes only one argument.
  • Allow methods/blocks with 12+ arguments.
  • Delegate #copyWithZone to #dup, as we don't do anything with the zone yet.
  • Copy the `trusted' state when creating a copy with #dup.
  • Fixed a crasher in ossl_rand.
  • A lot of fixes in String/Symbol/Regexp due to the ICU branch rewrite/merge.
  • Fixed a buffer overflow when computing helper selectors in the dispatcher.
  • Make sure #to_enum verifies that the argument is a symbol.
  • Array#rindex: don't lookup argument in an empty array.
  • Array#pack: fixed tainting of resulted string.
  • Avoid a crash in #define_singleton_method on immediate types.
  • Fixed a typo message in mkmf.rb.
  • Avoid integer truncation in BigDecimal.
  • Fixed a memory crasher in Bignum reallocation.
  • When dispatching a custom #respond_to? method, do not pass the second optional argument in case the arity is incompatible.
  • Fix random generation of bignums on 64-bit 10.6+ machines.
  • Fixed a bug in mkmf.rb (backported from upstream 1.9).
  • It is now possible to pass Proc to native C/ObjC functions or methods accepting function pointers.
  • Make Symbol compliant to NSCoding.
  • yaml: cleaned the extension code and fixed a few misc bugs.
  • Set the maxgroups constant to NGROUPS_MAX.
  • IO#tell, IO#seek: should not require readability and should be usable on write-only or read-only IOs.
  • Now AOT compiling rexml and xmlrpc standard libraries.
  • When defining a class, only allow a class as the super class (and not modules).
  • Added notify_post.rb sample.
  • Fixed bugs in ZSUPER (super with no argument and no parenthesis) compilation inside blocks.
  • Fixed a problem with Array#to_a.
  • Fixed a bug in Module#initialize which could be re-entered upon +initialize.
  • attr_accessor and attr_writer now generates writers that send KVO notifications (if #framework was called at least once).
  • Fixed a synchronization bug in the backquote operator.
  • Rewrote the super dispatcher to not rely on the stack trace.
  • Always try helper methods if a class is not a RubyObject descendant.
  • Better Objective-C ignored selector detection.
  • Implemented BEGIN{}.
  • Use the same message format for printed exceptions everywhere.
  • When preparing a method, do an extra resolve pass in case the Objective-C cache is invalid.
  • Force class initialization upon lazy lookup.
  • Added support for Array arguments in IO.popen.
  • Disable the lazy JIT in case the target class already has a custom Objective-C method resolver (like CALayer).
  • Do not auto-initialize classes that are not NSObject-based (like NSProxy).
  • Added Pointer#cast! method to retype pointers.
  • Allow any pointer to be converted to void*.
  • Fix bugs in the way Objective-C method types were generated.
  • When we acquire the core global lock, make sure we also release it in case an exception happens.
  • MacRuby will no longer insert the special primitive methods when you directly subclass NSArray, NSString and NSDictionary. It is unlikely to happen anymore with the new architecture.
  • When re-typing methods, do not re-type the same method twice and make sure the new signature matches the ruby arity.
  • Fixed a bug in TypeArity() where stack size annotations were not ignored.
  • The VM is now multithreaded-aware by default.
  • When checking if a given BridgeSupport path has already been loaded, do a case insensitive search.
  • Added support for anonymous structures (like {?=qq}).
  • Added several missing GC write barriers all around the code.
  • Make NSString, NSArray and NSDictionary yamlable.
  • Rewrote class flags to not use the version field anymore, better typing system, fixed misc bugs.
  • IRB should not crash when receiving Obj-C exceptions.
  • Added simple compiler support for bit fields and C-style arrays.
  • Improved support of opaque structures.
  • Fixed the ViewModelDemo sample syntax.

New in MacRuby 0.4 (Mar 10, 2009)

  • This is quite an important release that brings new features and fixes several problems. The changes are too numerous to be all mentioned, so here is a selection of the most interesting ones.
  • Threaded GC:
  • The MacRuby garbage collector is now running in multi-threaded mode by default. That means that MacRuby will always do garbage collections on a separate thread and therefore not interrupt the program's flow.
  • Full 64-bit Support:
  • MacRuby is now fully working in both Intel 32-bit and 64-bit modes. If you are running a recent Mac chances are that it is 64-bit and MacRuby will run faster on it. This is mainly due to the fact that the underlying infrastructure has been significantly improved for 64-bit processors.
  • DTrace Probes:
  • DTrace probes have been added to the core of the interpreter. You can now trace various things such as method calls or exceptions. All of that can be done on any MacRuby processes in the system.
  • DTrace is a very powerful tool that has proven to be extremely useful when debugging live applications. MacRuby ships with several DTrace scripts in /Developer/Examples/Ruby/MacRuby/DTrace to profile various things such as method count, duration or even objects collected by the GC.
  • Runtime Objective-C API:
  • MacRuby now exposes an Objective-C API that can be used to control the runtime from a pure Cocoa environment.
  • It should be helpful if you are working on an Objective-C Cocoa application and are considering using MacRuby to either implement new functionalities or to provide a scripting interface to your native objects.
  • New Xcode Templates:
  • A "MacRuby Core Data Application" template is now available, as well as an "Embed MacRuby" target. The latter can be used to embed MacRuby.framework inside your application bundle. Embedding the framework allows you to distribute your application to users and not require them to install MacRuby.
  • A Better HotCocoa:
  • HotCocoa is a thin, idiomatic Ruby layer that sits above Cocoa and other frameworks. It was introduced in MacRuby 0.3 and it has been significantly improved in 0.4.
  • New mappings for XML parser, KVO array/set accessors, property lists and more AppKit components were added as well as lots of bug fixes and improvements.
  • A "deploy" task was added to the project's Rakefile. This new task prepares an application for deployment by embedding the MacRuby runtime inside its bundle (similar to what the Xcode's Embed MacRuby target does). Once the "macrake deploy" task is complete, you can share your .app with friends who do not have MacRuby installed on their machine.
  • But the most interesting change is probably the new graphics layer, called HotCocoa::Graphics. It provides a simple object-oriented interface into the power of Mac OS X's Core Graphics and Core Image drawing libraries.
  • Misc Changes:
  • Over the list of minor changes, Set has been reimplemented on top of NSSet and NSNumber implements the Numeric methods. Finally, the standard library was updated to Ruby 1.9.1's version.
  • Caveat Lector:
  • While MacRuby 0.4 turns out to be pretty stable when it comes to Cocoa development, there are still a few problems with C extensions, RubyGems and Ruby IOs. We recommend to use the corresponding Cocoa APIs (when they exist) in the meantime we work on these issues.

New in MacRuby 0.3.1 (Sep 11, 2008)

  • This is an important release. MacRuby now comes with a core librarynamed HotCocoa, which simplifies Cocoa programming by using simple Ruby idioms.
  • The dispatcher was rewritten to use the Objective-C runtime, which eliminates many ambiguities but also improves some performance.
  • And finally, lots of bug fixes, and a better Cocoa and Ruby support.