Top Level Namespace

Defined Under Namespace

Modules: Comparable, Enumerable, Errno, JS, Kernel, Marshal, Math, ObjectSpace, Opal, PackUnpack, Process, __JS__ Classes: ArgumentError, Array, BasicObject, Binding, Boolean, Class, ClosedQueueError, Complex, Dir, EOFError, Encoding, EncodingError, Enumerator, Exception, FalseClass, FiberError, File, Float, FloatDomainError, FrozenError, GC, Hash, IO, IOError, IndexError, Integer, Interrupt, KeyError, LoadError, LocalJumpError, MatchData, Method, Module, NameError, NilClass, NoMatchingPatternError, NoMemoryError, NoMethodError, NotImplementedError, Number, Numeric, Object, PatternMatching, Proc, Random, Range, RangeError, Rational, Regexp, RegexpError, RuntimeError, ScriptError, SecurityError, Signal, SignalException, StandardError, StopIteration, String, Struct, SyntaxError, SystemCallError, SystemExit, SystemStackError, ThreadError, Time, TracePoint, TrueClass, TypeError, UnboundMethod, UncaughtThrowError, ZeroDivisionError

Constant Summary collapse

STDIN =
$stdin  = IO.new(0, 'r')
STDOUT =
$stdout = IO.new(1, 'w')
STDERR =
$stderr = IO.new(2, 'w')
NIL =
nil
Fixnum =
Number
Symbol =
String
TOPLEVEL_BINDING =
binding
TRUE =
true
FALSE =
false
RUBY_PLATFORM =
'opal'
RUBY_ENGINE =
'opal'
RUBY_VERSION =
'3.0.2'
RUBY_ENGINE_VERSION =
'1.3.2'
RUBY_RELEASE_DATE =
'2021-11-10'
RUBY_PATCHLEVEL =
0
RUBY_REVISION =
'0'
'opal - Copyright (C) 2013-2021 Adam Beynon and the Opal contributors'
RUBY_DESCRIPTION =
"opal #{RUBY_ENGINE_VERSION} (#{RUBY_RELEASE_DATE} revision #{RUBY_REVISION})"
ARGV =
[]
ARGF =
Object.new
ENV =
{}

Class Method Summary collapse

Class Method Details

.autoload(*args) ⇒ Object



9
10
11
# File 'opal/opal/corelib/main.rb', line 9

def self.autoload(*args)
  Object.autoload(*args)
end

.include(mod) ⇒ Object



5
6
7
# File 'opal/opal/corelib/main.rb', line 5

def self.include(mod)
  Object.include mod
end

.privateObject



214
215
216
# File 'opal/opal/corelib/unsupported.rb', line 214

def self.private(*)
  # stub
end

.publicObject



210
211
212
# File 'opal/opal/corelib/unsupported.rb', line 210

def self.public(*)
  # stub
end

.to_sObject



1
2
3
# File 'opal/opal/corelib/main.rb', line 1

def self.to_s
  'main'
end

.using(mod) ⇒ Object

Compiler overrides this method



14
15
16
# File 'opal/opal/corelib/main.rb', line 14

def self.using(mod)
  raise 'main.using is permitted only at toplevel'
end