[macruby-changes] [4662] DietRB/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Oct 8 03:55:53 PDT 2010
Revision: 4662
http://trac.macosforge.org/projects/ruby/changeset/4662
Author: eloy.de.enige at gmail.com
Date: 2010-10-08 03:55:52 -0700 (Fri, 08 Oct 2010)
Log Message:
-----------
Move Kernel::irb to context.rb
From: Eloy Duran <eloy.de.enige at gmail.com>
Modified Paths:
--------------
DietRB/trunk/lib/irb/context.rb
DietRB/trunk/lib/irb.rb
DietRB/trunk/spec/context_spec.rb
Removed Paths:
-------------
DietRB/trunk/spec/irb_spec.rb
Modified: DietRB/trunk/lib/irb/context.rb
===================================================================
--- DietRB/trunk/lib/irb/context.rb 2010-10-08 10:55:42 UTC (rev 4661)
+++ DietRB/trunk/lib/irb/context.rb 2010-10-08 10:55:52 UTC (rev 4662)
@@ -94,3 +94,12 @@
end
end
end
+
+module Kernel
+ # Creates a new IRB::Context with the given +object+ and runs it.
+ def irb(object, binding = nil)
+ IRB::Context.new(object, binding).run
+ end
+
+ private :irb
+end
Modified: DietRB/trunk/lib/irb.rb
===================================================================
--- DietRB/trunk/lib/irb.rb 2010-10-08 10:55:42 UTC (rev 4661)
+++ DietRB/trunk/lib/irb.rb 2010-10-08 10:55:52 UTC (rev 4662)
@@ -6,12 +6,3 @@
if !ENV['SPECCING'] && defined?(RUBY_ENGINE) && RUBY_ENGINE == "macruby"
require 'irb/ext/macruby'
end
-
-module Kernel
- # Creates a new IRB::Context with the given +object+ and runs it.
- def irb(object, binding = nil)
- IRB::Context.new(object, binding).run
- end
-
- private :irb
-end
\ No newline at end of file
Modified: DietRB/trunk/spec/context_spec.rb
===================================================================
--- DietRB/trunk/spec/context_spec.rb 2010-10-08 10:55:42 UTC (rev 4661)
+++ DietRB/trunk/spec/context_spec.rb 2010-10-08 10:55:52 UTC (rev 4662)
@@ -196,4 +196,13 @@
@context.run
@context.instance_variable_get(:@received).should.not == "def foo"
end
+end
+
+describe "Kernel::irb" do
+ it "creates a new context for the given object and runs it" do
+ Readline.stub_input("::IRBRan = self")
+ o = Object.new
+ irb(o)
+ IRBRan.should == o
+ end
end
\ No newline at end of file
Deleted: DietRB/trunk/spec/irb_spec.rb
===================================================================
--- DietRB/trunk/spec/irb_spec.rb 2010-10-08 10:55:42 UTC (rev 4661)
+++ DietRB/trunk/spec/irb_spec.rb 2010-10-08 10:55:52 UTC (rev 4662)
@@ -1,10 +0,0 @@
-require File.expand_path('../spec_helper', __FILE__)
-
-describe "Kernel::irb" do
- it "creates a new context for the given object and runs it" do
- Readline.stub_input("::IRBRan = self")
- o = Object.new
- irb(o)
- IRBRan.should == o
- end
-end
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101008/d62f1cfc/attachment.html>
More information about the macruby-changes
mailing list