[macruby-changes] [4671] DietRB/trunk/lib/irb/ext/history.rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Oct 8 03:57:16 PDT 2010


Revision: 4671
          http://trac.macosforge.org/projects/ruby/changeset/4671
Author:   eloy.de.enige at gmail.com
Date:     2010-10-08 03:57:15 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Small cleanup

From: Eloy Duran <eloy.de.enige at gmail.com>

Modified Paths:
--------------
    DietRB/trunk/lib/irb/ext/history.rb

Modified: DietRB/trunk/lib/irb/ext/history.rb
===================================================================
--- DietRB/trunk/lib/irb/ext/history.rb	2010-10-08 10:57:06 UTC (rev 4670)
+++ DietRB/trunk/lib/irb/ext/history.rb	2010-10-08 10:57:15 UTC (rev 4671)
@@ -44,7 +44,9 @@
         start_index = history_size - number_of_entries - 1
       end
       
-      start_index.upto(end_index) { |i| print_line(i) }
+      start_index.upto(end_index) do |i|
+        puts "#{i}: #{Readline::HISTORY[i]}"
+      end
     end
     
     def history!(entry_or_range)
@@ -63,13 +65,6 @@
         @context.process_line(line)
       end
     end
-    
-    private
-    
-    def print_line(line_number, show_line_numbers = true)
-      print "#{line_number}: " if show_line_numbers
-      puts Readline::HISTORY[line_number]
-    end
   end
 end
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/9aa571e6/attachment.html>


More information about the macruby-changes mailing list