I don't seem to be able to call Dispose on a filestream. Needless to
say this is problematic. Here's a paste, straight from the IR console (latest svn version 141) >>> require 'mscorlib' => true >>> include System::IO => Object >>> $fs = FileStream.new( 'file.txt', FileMode.Open ) => #<System::IO::FileStream:0x000005c> >>> $fs.Dispose c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:30:in `Call2': wrong number or type of arguments for `Dispose' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:38:in `Update2' from :0 >>>All the other methods on the filestream object work fine (read_all_text, and so on), but the call to dispose crashes. Likewise, I get a crash calling methods with overloads, which looks like it may (??) be related. >>> require 'mscorlib' => true >>> include System::IO => Object >>> $bytes = System::IO::File.read_all_bytes( 'file.txt' ); nil # nil is to prevent ir from printing the GIANT ARRAY => nil >>> $text = System::Text::Encoding.UTF8.get_string($bytes) c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\matchcaller.generated.cs:35:in `Call3': wrong number or type of arguments for `get_string' (ArgumentError) from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\callsite.cs:275:in `UpdateAndExecute' from c:\development\ironruby\trunk\src\microsoft.scripting.core\actions\updatedelegates.generated.cs:45:in `Update3' from :0 >>> $text = System::Text::Encoding.UTF8.get_string($bytes, 0, $bytes.length) => "PROPER TEXT GOES HERE"It seems like it can't figure out that there is GetString(bytes) and GetString(bytes, index, length) and just uses the latter always. Is there a solution for either of these problems? Thanks a lot, Orion |
_______________________________________________ Ironruby-core mailing list Ironruby-core@rubyforge.org http://rubyforge.org/mailman/listinfo/ironruby-core