[macruby-changes] [4889] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 5 14:10:44 PDT 2010


Revision: 4889
          http://trac.macosforge.org/projects/ruby/changeset/4889
Author:   eloy.de.enige at gmail.com
Date:     2010-11-05 14:10:42 -0700 (Fri, 05 Nov 2010)
Log Message:
-----------
Update IRB to dietrb 0.6.1

Modified Paths:
--------------
    MacRuby/trunk/lib/irb/ext/completion.rb
    MacRuby/trunk/lib/irb/version.rb
    MacRuby/trunk/spec/dietrb/ext/completion_spec.rb

Modified: MacRuby/trunk/lib/irb/ext/completion.rb
===================================================================
--- MacRuby/trunk/lib/irb/ext/completion.rb	2010-11-05 21:02:23 UTC (rev 4888)
+++ MacRuby/trunk/lib/irb/ext/completion.rb	2010-11-05 21:10:42 UTC (rev 4889)
@@ -82,6 +82,8 @@
     end
     
     def results
+      return if @source.strip.empty?
+
       source = @source
       filter = nil
       

Modified: MacRuby/trunk/lib/irb/version.rb
===================================================================
--- MacRuby/trunk/lib/irb/version.rb	2010-11-05 21:02:23 UTC (rev 4888)
+++ MacRuby/trunk/lib/irb/version.rb	2010-11-05 21:10:42 UTC (rev 4889)
@@ -9,7 +9,7 @@
     NAME  = 'DietRB'
     MAJOR = 0
     MINOR = 6
-    TINY  = 0
+    TINY  = 1
     
     STRING = [MAJOR, MINOR, TINY].join('.')
     DESCRIPTION = "#{NAME} (#{STRING})"

Modified: MacRuby/trunk/spec/dietrb/ext/completion_spec.rb
===================================================================
--- MacRuby/trunk/spec/dietrb/ext/completion_spec.rb	2010-11-05 21:02:23 UTC (rev 4888)
+++ MacRuby/trunk/spec/dietrb/ext/completion_spec.rb	2010-11-05 21:10:42 UTC (rev 4889)
@@ -46,6 +46,26 @@
   it "quacks like a Proc" do
     @completion.call('//.').should == imethods(Regexp, '//')
   end
+
+  it "completes reserved words as variables or constants" do
+    (IRB::Completion::RESERVED_DOWNCASE_WORDS +
+      IRB::Completion::RESERVED_UPCASE_WORDS).each do |word|
+      complete(word[0..-2]).should include(word)
+    end
+  end
+
+  it "completes file paths" do
+    complete("'/").should == Dir.glob('/*').sort.map { |f| "'#{f}" }
+    complete("'#{ROOT}/lib/../Ra").should == ["'#{File.join(ROOT, "Rakefile")}"]
+    complete("%{#{ROOT}/li").should == ['LICENSE', 'lib'].map { |f| "%{#{File.join(ROOT, f)}" }
+    complete("\"#{ROOT}/lib/").should == ['irb', 'irb.rb'].map { |f| "\"#{File.join(ROOT, 'lib', f)}" }
+  end
+
+  it "does not crash when trying to complete garbage" do
+    complete("").should == nil
+    complete("/").should == nil
+    complete("./Rake").should == nil
+  end
   
   describe "when doing a method call on an explicit receiver," do
     describe "and the source ends with a period," do
@@ -241,23 +261,4 @@
       complete("::CompletionSt").should == %w{ ::CompletionStub }
     end
   end
-  
-  it "completes reserved words as variables or constants" do
-    (IRB::Completion::RESERVED_DOWNCASE_WORDS +
-      IRB::Completion::RESERVED_UPCASE_WORDS).each do |word|
-      complete(word[0..-2]).should include(word)
-    end
-  end
-
-  it "completes file paths" do
-    complete("'/").should == Dir.glob('/*').sort.map { |f| "'#{f}" }
-    complete("'#{ROOT}/lib/../Ra").should == ["'#{File.join(ROOT, "Rakefile")}"]
-    complete("%{#{ROOT}/li").should == ['LICENSE', 'lib'].map { |f| "%{#{File.join(ROOT, f)}" }
-    complete("\"#{ROOT}/lib/").should == ['irb', 'irb.rb'].map { |f| "\"#{File.join(ROOT, 'lib', f)}" }
-  end
-
-  it "does not crash when trying to complete garbage" do
-    complete("/").should == nil
-    complete("./Rake").should == nil
-  end
 end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101105/fbfa4ed5/attachment-0001.html>


More information about the macruby-changes mailing list