delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/binmode_tags.txt;C807294
File: binmode_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/binmode_tags.txt;C807294  (server)    1/20/2010 12:34 PM
+++ [no target file]
@@ -1,3 +1,0 @@
-fails:ARGF.binmode returns self
-fails:ARGF.binmode puts reading into binmode
-fails:ARGF.binmode puts alls subsequent stream reading through ARGF into binmode
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/close_tags.txt;C1473028
File: close_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/close_tags.txt;C1473028  (server)    1/20/2010 12:34 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/close_tags.txt;crit_argf
@@ -1,3 +1,4 @@
 fails:ARGF.close closes the current open stream
 fails:ARGF.close returns self
 fails:ARGF.close raises an IOError if called on a closed stream
+fails:ARGF.close does not raise an IOError if called on a closed stream
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/getc_tags.txt;C1473028
File: getc_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/getc_tags.txt;C1473028  (server)    1/20/2010 12:34 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/getc_tags.txt;crit_argf
@@ -1,1 +1,2 @@
-critical:ARGF.getc
+fails:ARGF.getc reads each char of files
+fails:ARGF.getc returns nil when end of stream reached
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/gets_tags.txt;C1473028
File: gets_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/gets_tags.txt;C1473028  (server)    1/20/2010 12:34 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/gets_tags.txt;crit_argf
@@ -1,1 +1,8 @@
-critical:ARGF.gets
+fails:ARGF.gets reads one line of a file
+fails:ARGF.gets reads all lines of a file
+fails:ARGF.gets reads all lines of stdin
+fails:ARGF.gets reads all lines of two files
+fails:ARGF.gets sets $_ global variable with each line read
+fails:ARGF.gets modifies the files when in place edit mode is on
+fails:ARGF.gets modifies and backups two files when in place edit mode is on
+fails:ARGF.gets returns nil when reaching end of files
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/seek_tags.txt;C807294
File: seek_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/seek_tags.txt;C807294  (server)    1/20/2010 12:34 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/seek_tags.txt;crit_argf
@@ -1,4 +1,3 @@
 fails:ARGF.seek sets the absolute position relative to beginning of file
 fails:ARGF.seek sets the position relative to current position in file
 fails:ARGF.seek sets the absolute position relative to end of file
-fails:ARGF.seek takes at least one argument (offset)
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/skip_tags.txt;C1086571
File: skip_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/skip_tags.txt;C1086571  (server)    1/20/2010 12:34 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/skip_tags.txt;crit_argf
@@ -1,4 +1,3 @@
 fails:ARGF.skip skips the current file
 fails:ARGF.skip has no effect when called twice in a row
 fails:ARGF.skip has no effect at end of stream
-fails:ARGF.skip has no effect when the current file is the last
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/to_s_tags.txt;C807294
File: to_s_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/argf/to_s_tags.txt;C807294  (server)    1/20/2010 12:34 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-fails:ARGF.to_s returns 'ARGF'
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/bignum/plus_tags.txt;C1086571
File: plus_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/bignum/plus_tags.txt;C1086571  (server)    1/18/2010 2:00 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-critical:Bignum#+ calls #method_missing(:coerce) on the passed argument
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/fixnum/plus_tags.txt;C1086571
File: plus_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/fixnum/plus_tags.txt;C1086571  (server)    1/18/2010 2:00 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-critical:Fixnum#+ calls #method_missing(:coerce) on the passed argument
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/float/plus_tags.txt;C1086571
File: plus_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/core/float/plus_tags.txt;C1086571  (server)    1/18/2010 2:01 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-critical:Float#+ calls #method_missing(:coerce) on the passed argument
===================================================================
delete: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/bigdecimal/plus_tags.txt;C1086571
File: plus_tags.txt
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/ironruby-tags/library/bigdecimal/plus_tags.txt;C1086571  (server)    1/18/2010 2:03 PM
+++ [no target file]
@@ -1,1 +1,0 @@
-critical:BigDecimal#+ calls #method_missing(:coerce) on the passed argument
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/lib/mspec/mocks/mock.rb;C1473028
File: mock.rb
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/lib/mspec/mocks/mock.rb;C1473028  (server)    1/18/2010 1:56 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/External.LCA_RESTRICTED/Languages/IronRuby/mspec/mspec/lib/mspec/mocks/mock.rb;crit_argf
@@ -164,19 +164,36 @@
     end
   end
 
+  def self.uninstall_method(obj, sym, replaced)
+    meta = obj.metaclass
+    if mock_respond_to? obj, replaced
+      meta.__send__ :alias_method, sym, replaced
+      meta.__send__ :remove_method, replaced
+    else
+      meta.__send__ :remove_method, sym
+    end
+  end
+
   def self.cleanup
+    replaced_respond_tos = []
+    
     objects.each do |key, obj|
       replaced = key.first
       sym = key.last
-      meta = obj.metaclass
-
-      if mock_respond_to? obj, replaced
-        meta.__send__ :alias_method, sym, replaced
-        meta.__send__ :remove_method, replaced
+      
+      if sym != :respond_to?
+        uninstall_method obj, sym, replaced
       else
-        meta.__send__ :remove_method, sym
+        replaced_respond_tos << [obj, sym, replaced]
       end
     end
+      
+    
+    # remove respond_to? last so that we don't remove it while we still use it in mock_respond_to?
+    replaced_respond_tos.each do |obj, sym, replaced|
+      uninstall_method obj, sym, replaced
+    end
+
     reset
   end
 end
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1473028
File: Initializers.Generated.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;C1473028  (server)    1/18/2010 3:44 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Initializers.Generated.cs;crit_argf
@@ -434,10 +434,133 @@
         
         #if !SILVERLIGHT
         private static void Load__Singleton_ArgFilesSingletonOps_Instance(IronRuby.Builtins.RubyModule/*!*/ module) {
+            DefineLibraryMethod(module, "binmode", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.BinMode)
+            );
+            
+            DefineLibraryMethod(module, "close", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Close)
+            );
+            
+            DefineLibraryMethod(module, "closed?", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Boolean>(IronRuby.Builtins.ArgFilesSingletonOps.Closed)
+            );
+            
+            DefineLibraryMethod(module, "each", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Each), 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, System.Object, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Each)
+            );
+            
+            DefineLibraryMethod(module, "each_byte", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.EachByte)
+            );
+            
+            DefineLibraryMethod(module, "each_line", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Each), 
+                new Func<IronRuby.Runtime.RubyContext, IronRuby.Runtime.BlockParam, System.Object, IronRuby.Builtins.MutableString, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Each)
+            );
+            
+            DefineLibraryMethod(module, "eof", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Boolean>(IronRuby.Builtins.ArgFilesSingletonOps.EoF)
+            );
+            
+            DefineLibraryMethod(module, "eof?", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Boolean>(IronRuby.Builtins.ArgFilesSingletonOps.EoF)
+            );
+            
+            DefineLibraryMethod(module, "file", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.RubyIO>(IronRuby.Builtins.ArgFilesSingletonOps.ToIO)
+            );
+            
             DefineLibraryMethod(module, "filename", 0x51, 
                 new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.GetCurrentFileName)
             );
             
+            DefineLibraryMethod(module, "fileno", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.FileNo)
+            );
+            
+            DefineLibraryMethod(module, "getc", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Getc)
+            );
+            
+            DefineLibraryMethod(module, "gets", 0x51, 
+                new Func<IronRuby.Runtime.RubyScope, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.Gets), 
+                new Func<IronRuby.Runtime.RubyScope, System.Object, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.Gets)
+            );
+            
+            DefineLibraryMethod(module, "lineno", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.GetLineNumber)
+            );
+            
+            DefineLibraryMethod(module, "lineno=", 0x51, 
+                new Action<IronRuby.Runtime.RubyContext, System.Object, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.SetLineNumber)
+            );
+            
+            DefineLibraryMethod(module, "path", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.GetCurrentFileName)
+            );
+            
+            DefineLibraryMethod(module, "pos", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Pos)
+            );
+            
+            DefineLibraryMethod(module, "pos=", 0x51, 
+                new Action<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Runtime.IntegerValue>(IronRuby.Builtins.ArgFilesSingletonOps.Pos)
+            );
+            
+            DefineLibraryMethod(module, "read", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.Read), 
+                new Func<IronRuby.Runtime.RubyContext, Microsoft.Scripting.Runtime.DynamicNull, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.Read), 
+                new Func<IronRuby.Runtime.RubyContext, System.Int32, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.Read)
+            );
+            
+            DefineLibraryMethod(module, "readchar", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.ReadChar)
+            );
+            
+            DefineLibraryMethod(module, "readline", 0x51, 
+                new Func<IronRuby.Runtime.RubyScope, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.ReadLine), 
+                new Func<IronRuby.Runtime.RubyScope, System.Object, IronRuby.Builtins.MutableString, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.ReadLine)
+            );
+            
+            DefineLibraryMethod(module, "readlines", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArgFilesSingletonOps.ReadLines), 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArgFilesSingletonOps.ReadLines)
+            );
+            
+            DefineLibraryMethod(module, "rewind", 0x51, 
+                new Action<IronRuby.Runtime.RubyContext, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Rewind)
+            );
+            
+            DefineLibraryMethod(module, "seek", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Runtime.IntegerValue, System.Int32, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.Seek)
+            );
+            
+            DefineLibraryMethod(module, "skip", 0x51, 
+                new Action<IronRuby.Runtime.RubyContext, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Skip)
+            );
+            
+            DefineLibraryMethod(module, "tell", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Object>(IronRuby.Builtins.ArgFilesSingletonOps.Pos)
+            );
+            
+            DefineLibraryMethod(module, "to_a", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.RubyArray>(IronRuby.Builtins.ArgFilesSingletonOps.TOA)
+            );
+            
+            DefineLibraryMethod(module, "to_i", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, System.Int32>(IronRuby.Builtins.ArgFilesSingletonOps.FileNo)
+            );
+            
+            DefineLibraryMethod(module, "to_io", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.RubyIO>(IronRuby.Builtins.ArgFilesSingletonOps.ToIO)
+            );
+            
+            DefineLibraryMethod(module, "to_s", 0x51, 
+                new Func<IronRuby.Runtime.RubyContext, System.Object, IronRuby.Builtins.MutableString>(IronRuby.Builtins.ArgFilesSingletonOps.ToS)
+            );
+            
         }
         #endif
         
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArgFilesSingletonOps.cs;C791094
File: ArgFilesSingletonOps.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArgFilesSingletonOps.cs;C791094  (server)    1/18/2010 3:02 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Libraries.LCA_RESTRICTED/Builtins/ArgFilesSingletonOps.cs;crit_argf
@@ -16,6 +16,7 @@
 
 using Microsoft.Scripting.Runtime;
 using IronRuby.Runtime;
+using System.Runtime.InteropServices;
 
 namespace IronRuby.Builtins {
 
@@ -25,41 +26,199 @@
     [RubyConstant("ARGF")]
     [RubySingleton(BuildConfig = "!SILVERLIGHT"), Includes(typeof(Enumerable))]
     public static class ArgFilesSingletonOps {
+        #region to_i, fileno, to_s, to_a
+        [RubyMethod("to_i")]
+        [RubyMethod("fileno")]
+        public static int FileNo(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.FileNo(context.InputProvider.GetCurrentStream());
+        }
 
-        //fileno
-        //tell
-        //file
-        //eof
-        //to_s
-        //each
-        //readline
-        //lineno=
-        //path
-        //to_i
-        //getc
-        //pos
-        //eof?
-        //gets
+        [RubyMethod("file")]
+        [RubyMethod("to_io")]
+        public static RubyIO ToIO(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.ToIO(context.InputProvider.GetCurrentStream());
+        }
 
+        [RubyMethod("to_s")]
+        public static MutableString ToS(RubyContext/*!*/ context, object self) {
+            return MutableString.CreateAscii("ARGF");
+        }
+
+        [RubyMethod("to_a")]
+        public static RubyArray/*!*/ TOA(RubyContext/*!*/ context, object self) {
+            RubyArray result = new RubyArray();
+            RubyArray lines;
+
+            while (context.InputProvider.HasMoreFiles()) {
+                lines = RubyIOOps.ReadLines(context, context.InputProvider.GetOrResetCurrentStream());
+                //TODO: result.append(lines)???
+                foreach (var line in lines) {
+                    result.Add(line);
+                }
+            }
+            return result;
+        }
+        #endregion
+
+        #region pos, tell, pos=, lineno, lineno=
+        [RubyMethod("pos")]
+        [RubyMethod("tell")]
+        public static object Pos(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.Pos(context.InputProvider.GetCurrentStream());
+        }
+
+        [RubyMethod("pos=")]
+        public static void Pos(RubyContext/*!*/ context, object self, [DefaultProtocol]IntegerValue pos) {
+            RubyIOOps.Pos(context.InputProvider.GetCurrentStream(), pos);
+        }
+
+        [RubyMethod("lineno=")]
+        public static void SetLineNumber(RubyContext/*!*/ context, object self, [DefaultProtocol]int value) {
+            RubyIOOps.SetLineNumber(context, context.InputProvider.GetCurrentStream(), value);
+        }
+
+        [RubyMethod("lineno")]
+        public static int GetLineNumber(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.GetLineNumber(context.InputProvider.GetCurrentStream());
+        }
+        #endregion
+
+        #region rewind, seek, skip
+        [RubyMethod("rewind")]
+        public static void Rewind(RubyContext/*!*/ context, object self) {
+            RubyIOOps.Rewind(context, context.InputProvider.GetCurrentStream());
+        }
+
+        [RubyMethod("seek")]
+        public static int Seek(RubyContext/*!*/ context, object self, [DefaultProtocol]IntegerValue pos, [DefaultProtocol, DefaultParameterValue(RubyIOOps.SEEK_SET)]int seekOrigin) {
+            return RubyIOOps.Seek(context.InputProvider.GetCurrentStream(), pos, seekOrigin);
+        }
+
+        [RubyMethod("skip")]
+        public static void Skip(RubyContext/*!*/ context, object self) {
+            //TODO: this will currently fail specs since it will cause errors at
+            //the end of the array, and it will have effect when called multiple times
+            context.InputProvider.IncrementCurrentFileIndex();
+        }
+        #endregion
+
+        #region each, each_line, each_byte
+        [RubyMethod("each")]
+        [RubyMethod("each_line")]
+        public static object Each(RubyContext/*!*/ context, BlockParam block, object self){
+            RubyIOOps.Each(context, block, context.InputProvider.GetOrResetCurrentStream());
+            return self;
+        }
+
+        [RubyMethod("each")]
+        [RubyMethod("each_line")]
+        public static object Each(RubyContext/*!*/ context, BlockParam block, object self, [DefaultProtocol]MutableString separator) {
+            RubyIOOps.Each(context, block, context.InputProvider.GetOrResetCurrentStream(), separator);
+            return self;
+        }
+
+        [RubyMethod("each_byte")]
+        public static object EachByte(RubyContext/*!*/ context, BlockParam block, object self) {
+            RubyIOOps.EachByte(block, context.InputProvider.GetOrResetCurrentStream());
+            return self;
+        }
+        #endregion
+
+        #region read, readline, readlines
+        [RubyMethod("readline")]
+        public static MutableString/*!*/ ReadLine(RubyScope/*!*/ scope, object self) {
+            return RubyIOOps.ReadLine(scope, scope.RubyContext.InputProvider.GetOrResetCurrentStream());
+        }
+
+        [RubyMethod("readline")]
+        public static MutableString/*!*/ ReadLine(RubyScope/*!*/ scope, object self, [DefaultProtocol]MutableString separator) {
+            return RubyIOOps.ReadLine(scope, scope.RubyContext.InputProvider.GetOrResetCurrentStream(), separator);
+        }
+
+        [RubyMethod("read")]
+        public static MutableString/*!*/ Read(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.Read(context.InputProvider.GetOrResetCurrentStream());
+        }
+
+        [RubyMethod("read")]
+        public static MutableString/*!*/ Read(RubyContext/*!*/ context, DynamicNull bytes, [DefaultProtocol, Optional]MutableString buffer) {
+            return RubyIOOps.Read(context.InputProvider.GetOrResetCurrentStream(), bytes, buffer);
+        }
+
+        [RubyMethod("read")]
+        public static MutableString/*!*/ Read(RubyContext/*!*/ context, [DefaultProtocol]int bytes, [DefaultProtocol, Optional]MutableString buffer) {
+            return RubyIOOps.Read(context.InputProvider.GetOrResetCurrentStream(), bytes, buffer);
+        }
+
+        [RubyMethod("readchar")]
+        public static int ReadChar(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.ReadChar(context.InputProvider.GetOrResetCurrentStream());
+        }
+
+        [RubyMethod("readlines")]
+        public static RubyArray/*!*/ ReadLines(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.ReadLines(context, context.InputProvider.GetOrResetCurrentStream());
+        }
+
+        [RubyMethod("readlines")]
+        public static RubyArray/*!*/ ReadLines(RubyContext/*!*/ context, object self, [DefaultProtocol]MutableString separator) {
+            return RubyIOOps.ReadLines(context, context.InputProvider.GetOrResetCurrentStream(), separator);
+        }
+        #endregion
+
+        [RubyMethod("eof")]
+        [RubyMethod("eof?")]
+        public static bool EoF(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.Eof(context.InputProvider.GetCurrentStream());
+        }
+
+        #region getc, gets
+        [RubyMethod("getc")]
+        public static object Getc(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.Getc(context.InputProvider.GetOrResetCurrentStream());
+        }
+
+        [RubyMethod("gets")]
+        public static MutableString Gets(RubyScope/*!*/ scope, object self) {
+            return Gets(scope, self, scope.RubyContext.InputSeparator);
+        }
+
+        [RubyMethod("gets")]
+        public static MutableString Gets(RubyScope/*!*/ scope, object self, [DefaultProtocol]MutableString separator) {
+            return RubyIOOps.Gets(scope, scope.RubyContext.InputProvider.GetOrResetCurrentStream(), separator);
+        }
+        #endregion
+
+        [RubyMethod("path")]
         [RubyMethod("filename")]
         public static MutableString/*!*/ GetCurrentFileName(RubyContext/*!*/ context, object self) {
             return context.InputProvider.CurrentFileName;
         }
 
-        //close
-        //each_byte
-        //read
-        //rewind
-        //pos=
-        //to_io
-        //seek
-        //skip
-        //readchar
-        //closed?
-        //each_line
-        //readlines
-        //binmode
-        //lineno
+        #region close, closed?
+        [RubyMethod("close")]
+        public static object Close(RubyContext/*!*/ context, object self) {
+            //TODO: See http://redmine.ruby-lang.org/issues/show/1633
+            // this should raise an error if called twice on an object, currently 
+            // it will just advance the stream which actually matches 1.8.6 behavior
+            // but matz has said current 1.8.6 behavior is a bug.
+            RubyIOOps.Close(context.InputProvider.GetOrResetCurrentStream());
+            return self;
+        }
+
+        [RubyMethod("closed?")]
+        public static bool Closed(RubyContext/*!*/ context, object self) {
+            return RubyIOOps.Closed(context.InputProvider.GetCurrentStream());
+        }
+        #endregion
+
+        [RubyMethod("binmode")]
+        public static object BinMode(RubyContext/*!*/ context, object self) {
+            RubyIOOps.Binmode(context.InputProvider.GetCurrentStream());
+            context.InputProvider.DefaultMode = context.InputProvider.DefaultMode | IOMode.PreserveEndOfLines;
+            return self;
+        }
+
     }
 }
 #endif
\ No newline at end of file
===================================================================
edit: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyInputProvider.cs;C1429753
File: RubyInputProvider.cs
===================================================================
--- $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyInputProvider.cs;C1429753  (server)    1/18/2010 3:11 PM
+++ Shelved Change: $/Dev10/feature/vs_langs01_s/Merlin/Main/Languages/Ruby/Ruby/Builtins/RubyInputProvider.cs;crit_argf
@@ -17,17 +17,21 @@
 using System.Threading;
 using Microsoft.Scripting.Utils;
 using IronRuby.Runtime;
+using System.IO;
 
 namespace IronRuby.Builtins {
     public sealed class RubyInputProvider {
         private readonly RubyContext/*!*/ _context;
 
         // $<. ARGF
-        private object/*!*/ _singleton; 
+        private object/*!*/ _singleton;
+        private RubyIO _singletonStream;
+        private IOMode _defaultMode;
         
         // $*, ARGV
         private readonly RubyArray/*!*/ _commandLineArguments;
 
+        private int _currentFileIndex;
         // $.
         private int _lastInputLineNumber;
 
@@ -43,7 +47,9 @@
 
             _commandLineArguments = args;
             _lastInputLineNumber = 1;
+            _currentFileIndex = -1;
             _singleton = new object();
+            _defaultMode = IOMode.ReadOnly;
         }
         
         public RubyContext/*!*/ Context {
@@ -59,6 +65,19 @@
             }
         }
 
+        public RubyIO SingletonStream {
+            get { return _singletonStream; }
+            private set {
+                Assert.NotNull(value);
+                _singletonStream = value;
+            }
+        }
+
+        public IOMode DefaultMode {
+            get { return _defaultMode; }
+            set { _defaultMode = value; }
+        }
+
         public RubyArray/*!*/ CommandLineArguments {
             get { return _commandLineArguments; }
         }
@@ -70,15 +89,46 @@
 
         public MutableString/*!*/ CurrentFileName {
             get {
-                // TODO:
-                return MutableString.CreateAscii("-");
+                if (CommandLineArguments.Count == 0) {
+                    return MutableString.CreateAscii("-");
+                } else {
+                    return MutableString.CreateAscii(CommandLineArguments[_currentFileIndex].ToString());
+                }
             }
         }
 
+
+        public RubyIO GetCurrentStream() {
+            return GetCurrentStream(false);
+        }
+
+        public RubyIO GetCurrentStream(bool reset) {
+            if (null == SingletonStream || (reset && (SingletonStream.Closed || SingletonStream.IsEndOfStream()))){
+                IncrementCurrentFileIndex();
+                ResetCurrentStream();
+            } 
+            return SingletonStream;
+        }
+
+        public RubyIO GetOrResetCurrentStream() {
+            return GetCurrentStream(true);
+        }
+
+        public void ResetCurrentStream() {
+            string file = CurrentFileName.ToString();
+            Stream stream = RubyFile.OpenFileStream(_context, file, _defaultMode);
+            SingletonStream = new RubyIO(_context, stream, _defaultMode);
+        }
+
+
         public void IncrementLastInputLineNumber() {
             Interlocked.Increment(ref _lastInputLineNumber);
         }
 
+        public void IncrementCurrentFileIndex() {
+            Interlocked.Increment(ref _currentFileIndex);
+        }
+
         private void ExpandArgument(RubyArray/*!*/ args, string/*!*/ arg, RubyEncoding/*!*/ encoding) {
             if (arg.IndexOf('*') != -1 || arg.IndexOf('?') != -1) {
                 bool added = false;
@@ -94,5 +144,9 @@
                 args.Add(MutableString.Create(arg, encoding));
             }
         }
+
+        public bool HasMoreFiles() {
+            return _currentFileIndex != _commandLineArguments.Count - 1;
+        }
     }
 }
===================================================================
