From: Hu Yoi Date: 2007-09-12T23:51:39+09:00 Subject: Re: copy/paste line numbers with code Max Williams wrote: > I'm writing up my project report and want to include line numbers with > the code that i paste into my word doc writeup. Does anyone know of a > ruby editor for windows that will allow this? I use SciTE and Eclipse > already but can't see how to do it using those, so if someone knows a > way for those that would be ideal. > > thanks > max I have used a bit of Ruby code to do this: code = File.open("Song.rb") code.each { |line| puts "#{code.lineno}. #{line}" } code.close present your .rb file to replace "Song.rb" and copy code with line number from your Console or SciTE -- Posted via http://www.ruby-forum.com/.