The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
The mechanically verified Ruby 1.9 changelog

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eigen Class

Posts: 358
Nickname: eigenclass
Registered: Oct, 2005

Eigenclass is a hardcore Ruby blog.
The mechanically verified Ruby 1.9 changelog Posted: Dec 23, 2007 5:35 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eigen Class.
Original Post: The mechanically verified Ruby 1.9 changelog
Feed Title: Eigenclass
Feed URL: http://feeds.feedburner.com/eigenclass
Feed Description: Ruby stuff --- trying to stay away from triviality.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eigen Class
Latest Posts From Eigenclass

Advertisement

As you probably know, I have been maintaining a list of the differences between Ruby 1.8 and 1.9 for the last two years, summarizing over 50000 lines of changelogs. Ruby 1.9 is to be released real soon now, so it was about time to update it once again.

Since new features come and go constantly, keeping the list up-to-date requires a lot of work: I have to verify that old entries still apply to the latest builds, and correct or remove those that no longer do. The accumulated amount of work increases quadratically with the number of features, so to speak. This is why I've invested several hours to convert the changelog to a format that can be verified mechanically.

The new changelog is a Ruby program that annotates the examples, formats the descriptions and verifies that the entries are still relevant. The code can be found at http://eigenclass.org/repos/ruby-changelog. At some point, I can imagine something like this being included in Ruby's sources.

Each entry encapsulates a description, one or more snippets to be annotated (evaluated under Ruby 1.8, 1.9 or both), and optional assertions that verify that the documentation matches the actual behavior.

Some examples

   new_syntax("Block local variables", :dst_code => <<-CODE, :text => <<-TXT)
     d = 2
     a = lambda{|;d| d = 1}
     a.call()
     d		# => 
   CODE
     You can declare block local variables with this syntax: 
       {|normal args; local variables| ...}
     When a variable is shadowed, ruby1.9 issues a warning.
   TXT
   new_semantics("Block arguments are always local", :code => <<-CODE) do |c|
     a = 1
     10.times{|a| }
     p a
   CODE
     assert_equal(1, dst_eval(c))
     assert_equal(9, src_eval(c))
   end

When you execute the changelog, the above entries are turned into this:


Read more...

Read: The mechanically verified Ruby 1.9 changelog

Topic: New Rule Previous Topic   Next Topic Topic: Rake 0.8.0 now part of Ruby svn

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use