Inheritance: LanguageOptions
Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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;
 }
Example #5
0
        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;
        }
Example #6
0
        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;
        }