Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Ruby

Ruby 2.0.0 Released 121

An anonymous reader writes "Today version 2.0.0 of Ruby has been released. This is a stable release, and the Ruby team has done their best to make it compatible with 1.9, making it easier to migrate than it was to switch from 1.8 to 1.9. New core language features include: 'Keyword arguments, which give flexibility to API design; Module#prepend, which is a new way to extend a class; A literal %i, which creates an array of symbols easily; __dir__, which returns the dirname of the file currently being executed; and UTF-8 default encoding, which make many magic comments omissible.' There are also new built-in libraries for lazy stream and for an asynchronous exception handling API. The release includes a number of performance improvements and debug support for DTrace."
This discussion has been archived. No new comments can be posted.

Ruby 2.0.0 Released

Comments Filter:
  • by Anonymous Coward

    But when will it be available in my apt-get?

    • Re: (Score:3, Informative)

      by Anonymous Coward

      Use RVM:
      rvm get head && rvm install 2.0.0

      • by Anonymous Coward

        Why? Yet Another Fscking Package Manager. I've got a perfectly working apt-get, and until ruby 2.0.0 is in there it doesn't count.

      • on debian [lucas-nussbaum.net], there are better alternatives to rvm:

        apt-get install ruby-build
        rbenv install 2.0.0-dev

        In addition, with rbenv, no-one is encouraged to use gemsets instead of bundler.

    • But when will it be available in my apt-get?

      Ask your debian/ubuntu package maintainer. You could just use RVM or rbenv-build.

    • in Ubuntu or Linux Mint or Debian, get the prerequisites
      sudo apt-get install libyaml-dev ncurses-dev libreadline-dev bison libgdbm-dev libc6-dev libssl-dev libmysql++-dev libsqlite3-dev make build-essential libssl-dev libreadline6-dev zlib1g-dev libyaml-dev gcc

      then download the ruby2 source from ruby-lang.org. then untar it and make/install it:
      tar xvfz ruby-2.0.0-p0.tar.gz
      cd ruby-2.0.0-p0 ./configure
      make
      sudo apt-get install

      see if it works:

      /usr/local/bin/ruby -v
      ruby 2.0.0p0 (2013-02-24) [x86_6

      • wow, slashdot formatting sure mangled some of that. let's putsome explicit < br / > in there:

        tar xvfz ruby-2.0.0-p0.tar.gz

        cd ruby-2.0.0-p0
        ./configure

        make

        sudo make install

  • Too early! (Score:5, Funny)

    by Anonymous Coward on Sunday February 24, 2013 @11:21AM (#42995577)

    Should have been released on Tuesday. Ruby Twosday. :D

  • by Anonymous Coward

    Refinements, which allows meta programming to be scoped to a particular namespace. This addresses a lot of concerns about meta programming code having too much global impact if done as a "monkey patch" or module include/prepend (which is just a glorified name for a monkey patch that can subclasses from, and can invooverride arched class'smethods instead of rewriting the method on the patched class).

    However, it's released as "experimental" probably because they still haven't figured out how implement this in

    • by HiThere ( 15173 )

      What bothers me is that they don't say that it's truly parallel yet. This probably means that they've still got that fake parallelism in there to keep the libraries happy. They *REALLY* need to solve that.

      It's true that what they introduced in 1.9.? was a lot better than nothing, but it's not good enough with MPUs becomming so dominant. And doing parallelism at the gross level of processes isn't very satisfactory. Threads should have a means of multi-tasking.

  • by petsounds ( 593538 ) on Sunday February 24, 2013 @04:55PM (#42997623)

    Happy birthday to Ruby! Pretty cool the way that numeric coincidence worked out.

    2.0 looks like a nice step forwards. I'm not sure where I stand on Refinements yet. I hate the method overriding of base classes that goes on in Ruby land, and Refinements is supposed to minimize the bad affects of that by offering scoped alterations, but from what I've heard there's a lot of side effects. Frankly, I think Ruby needs a 'protected' type; any other solution is just monkeys all the way down. But I could say this about a lot of the popular languages right now.

  • by Anonymous Coward

    Skillset momentum aside, why would anyone choose Ruby over Node.JS [wikipedia.org]?

    Node is *significantly* faster [debian.org] right out of the box (while Ruby JIT is still in its infancy [infoworld.com]). With so many well-funded implementations (Google [wikipedia.org], Mozilla, Opera, Microsoft) competing to be a tiny bit faster in any way possible, JavaScript is very likely to remain the fastest dynamically-typed language. Node is also built with a specific emphasis on scalability / parallel performance.

    Node.JS also has the advantage of using the same language o

Avoid strange women and temporary variables.

Working...