private RubyArray /*!*/ MakeLoadPaths(RubyOptions /*!*/ options) { var loadPaths = new RubyArray(); if (options.HasSearchPaths) { foreach (string path in options.SearchPaths) { loadPaths.Add(_context.EncodePath(path)); } } #if !SILVERLIGHT // no library paths on Silverlight string applicationBaseDir; try { applicationBaseDir = AppDomain.CurrentDomain.BaseDirectory; } catch (SecurityException) { applicationBaseDir = null; } AddAbsoluteLibraryPaths(loadPaths, applicationBaseDir, options.LibraryPaths); #endif loadPaths.Add(MutableString.CreateAscii(".")); return(loadPaths); }
private RubyArray /*!*/ MakeLoadPaths(RubyOptions /*!*/ options) { var loadPaths = new RubyArray(); if (options.HasSearchPaths) { foreach (string path in options.SearchPaths) { loadPaths.Add(_context.EncodePath(path)); } } AddStandardLibraryPath(loadPaths, options.StandardLibraryPath, options.ApplicationBase); // TODO: remove? loadPaths.Add(MutableString.CreateAscii(".")); return(loadPaths); }
private RubyArray/*!*/ MakeLoadPaths(RubyOptions/*!*/ options) { var loadPaths = new RubyArray(); if (options.HasSearchPaths) { foreach (string path in options.SearchPaths) { loadPaths.Add(MutableString.Create(path.Replace('\\', '/'))); } } #if !SILVERLIGHT // no library paths on Silverlight string applicationBaseDir; try { applicationBaseDir = AppDomain.CurrentDomain.BaseDirectory; } catch (SecurityException) { applicationBaseDir = null; } AddAbsoluteLibraryPaths(loadPaths, applicationBaseDir, options.LibraryPaths); #endif loadPaths.Add(MutableString.Create(".")); return loadPaths; }
// copies relevant options from runtime options: public RubyCompilerOptions(RubyOptions/*!*/ runtimeOptions) { Compatibility = runtimeOptions.Compatibility; }
private RubyArray/*!*/ MakeLoadPaths(RubyOptions/*!*/ options) { var loadPaths = new RubyArray(); if (options.HasSearchPaths) { foreach (string path in options.SearchPaths) { loadPaths.Add(_context.EncodePath(path)); } } AddStandardLibraryPath(loadPaths, options.StandardLibraryPath, options.ApplicationBase); // TODO: remove? loadPaths.Add(MutableString.CreateAscii(".")); return loadPaths; }
private RubyArray/*!*/ MakeLoadPaths(RubyOptions/*!*/ options) { var loadPaths = new RubyArray(); if (options.HasSearchPaths) { foreach (string path in options.SearchPaths) { loadPaths.Add(_context.EncodePath(path)); } } #if !SILVERLIGHT // no library paths on Silverlight string applicationBaseDir; try { applicationBaseDir = AppDomain.CurrentDomain.BaseDirectory; } catch (SecurityException) { applicationBaseDir = null; } AddAbsoluteLibraryPaths(loadPaths, applicationBaseDir, (ICollection<string>)options.LibraryPaths ?? new[] { @"..\Lib\ironruby", @"..\Lib\ruby\site_ruby\" + _context.StandardLibraryVersion, @"..\Lib\ruby\" + _context.StandardLibraryVersion, }); #endif // TODO: remove? loadPaths.Add(MutableString.CreateAscii(".")); return loadPaths; }