Esempio n. 1
0
 public static object Load(RubyScope /*!*/ scope, RubyModule /*!*/ self, object io)
 {
     try {
         foreach (object obj in MakeConstructor(scope, CheckYamlPort(io)))
         {
             return(obj);
         }
         return(null);
     } finally {
         RubyIO rio = io as RubyIO;
         if (rio != null)
         {
             rio.Close();
         }
     }
 }
Esempio n. 2
0
 public static object Parse(RubyModule self, object io)
 {
     try {
         foreach (object obj in MakeComposer(CheckYamlPort(io)))
         {
             return(obj);
         }
         return(null);
     } finally {
         RubyIO rio = io as RubyIO;
         if (rio != null)
         {
             rio.Close();
         }
     }
 }
Esempio n. 3
0
 public static object Load(ConversionStorage <MutableString> /*!*/ toStr, RespondToStorage /*!*/ respondTo,
                           RubyScope /*!*/ scope, RubyModule /*!*/ self, object io)
 {
     try {
         foreach (object obj in MakeConstructor(scope.GlobalScope, GetStream(toStr, respondTo, io)))
         {
             return(obj);
         }
         return(null);
     } catch (Exception e) {
         throw RubyExceptions.CreateArgumentError(e, e.Message);
     } finally {
         RubyIO rio = io as RubyIO;
         if (rio != null)
         {
             rio.Close();
         }
     }
 }