Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

OS X version detection in Ruby (See related posts)

// detects OS X version

>> `osascript -e 'tell application "Finder"\nreturn version\nend tell'`.chop!
=> "10.5.3"

Comments on this post

vinterbleg posts on May 03, 2008 at 06:08
No, this gives the current version of the Finder, not Mac OS X...

The version of Mac OS X on my computer is 10.5.2, while the version of Finder is 10.5.3.

- Simon

You need to create an account or log in to post comments to this site.


Click here to browse all 4836 code snippets

Related Posts