From: "David A. Black" Date: 2009-10-06T20:22:44+09:00 Subject: Re: Ruby for the wrong reason Hi -- On Tue, 6 Oct 2009, Adam Bilbrough wrote: > flebber wrote: >> On Oct 6, 7:49???pm, Adam Bilbrough >> wrote: >>> To: "ruby-talk ML" >>>> At the time I had no knowledge and tossed up between Ruby and Python, >>> >>> >>>> this be significantly easier in Ruby. >>>> ??? ??? ??? ?????????userIn = raw_input("Type Date dd/mm/yy: ") >>>> ??? ??? ??? ??? ??? ?????????print "Try again! dd/mm/yy\n" >>>> ??? ?????????Fname = "data.dat" >>>> ??? ?????????newFname = d2 + Fname >>>> ??? ?????????return newFname >>>> print ObtainDate() >>> >>> -- Kind Regards, >>> Rajinder Yadav >>> >>> http://DevMentor.org >>> Do Good ~ Share Freely >> >> So If I use version 1.8.6 and later want to update my project to the >> 1.9 series would this be a hard conversion? > > For Ruby, no. Tt has no specific indentations to follow (within reason) > and the only things that have changed as far as I know (been a while > since I read the release docs) 1.9.1 adds some new functionality to Ruby > but doesn't change the syntax (like Python 2 - 3 did). > With my program I was working on, I was using 1.9.1 (on my old linux > distro) and also running it on my Mac (1.8.7), so as far as the scope of > my program was concerned, the versions were universally capable of > running on either system with zero changes. The syntax has actually changed in certain respects. See: http://dablog.rubypal.com/2009/1/14/10-things-to-be-aware-of-in-moving-to-ruby-1-9 and the sequel post (there's a link). David -- David A. Black, Director Ruby Power and Light, LLC (http://www.rubypal.com) Ruby/Rails training, consulting, mentoring, code review Book: The Well-Grounded Rubyist (http://www.manning.com/black2)