source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
opal/opal
https://github.com/opal/opal
spec/opal/core/language/arguments/underscore_arg_spec.rb
Ruby
mit
4,915
master
2,368
describe 'duplicated underscore parameter' do it 'assigns the first arg' do klass = Class.new { def req_req(_, _) = _ def req_rest_req(_, *, _) = _ def rest_req(*_, _) = _ def req_opt(_, _ = 0) = _ def opt_req(_ = 0, _) = _ def req_kwopt(_, _: 0) = _ def req_kwrest(_, **_...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/language/arguments/mlhs_arg_spec.rb
Ruby
mit
4,915
master
460
# backtick_javascript: true describe 'mlhs argument' do context 'when pased value is falsey in JS' do it 'still returns it' do p = ->((a)){ a } p.call(false).should == false p.call("").should == "" p.call(0).should == 0 end end context 'when passed value == null' do it 'repla...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/marshal/dump_spec.rb
Ruby
mit
4,915
master
2,400
# encoding: binary require 'spec_helper' module MarshalExtension end class MarshalUserRegexp < Regexp end class UserMarshal attr_reader :data def initialize @data = 'stuff' end def marshal_dump() 'data' end def marshal_load(data) @data = data end def ==(other) self.class === other and @data == othe...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/marshal/load_spec.rb
Ruby
mit
4,915
master
399
describe "Marshal.load" do it 'loads array with instance variable' do a = Marshal.load("\x04\bI[\bi\x06i\ai\b\x06:\n@ivari\x01{") a.should == [1, 2, 3] a.instance_variable_get(:@ivar).should == 123 end it 'loads a hash with a default value (hash_def)' do hash = Marshal.load("\x04\b}\x06i\x06i\a:\...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/hash/internals_spec.rb
Ruby
mit
4,915
master
8,328
# backtick_javascript: true describe 'Hash' do describe 'internal implementation of string keys' do before :each do @h = {'a' => 123, 'b' => 456} end it 'stores keys directly as strings in the `Map`' do `#@h.size`.should == 2 `Array.from(#@h.keys())[0]`.should == 'a' `Array.from...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/subclassing_spec.rb
Ruby
mit
4,915
master
290
require 'spec_helper' class MyStringSubclass < String attr_reader :v def initialize(s, v) super(s) @v = v end end describe "String subclassing" do it "should call initialize for subclasses" do c = MyStringSubclass.new('s', 5) [c, c.v].should == ['s', 5] end end
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/to_proc_spec.rb
Ruby
mit
4,915
master
505
require 'spec_helper' describe "Symbol#to_proc" do # bug #2417 it "correctly passes method name to #method_missing" do obj = Object.new def obj.method_missing(*args); args; end; result = :a.to_proc.call(obj, 6, 7) result.should == [:a, 6, 7] end it "correctly passes a block to #method_missing"...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/gsub_spec.rb
Ruby
mit
4,915
master
1,119
require 'spec_helper' describe 'String' do describe '#gsub' do it 'handles recursive gsub' do pass_slot_rx = /{(\d+)}/ recurse_gsub = -> text { text.gsub(pass_slot_rx) { index = $1.to_i if index == 0 recurse_gsub.call '{1}' else 'value' ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/unpack_spec.rb
Ruby
mit
4,915
master
737
require 'spec_helper' describe 'String#unpack' do it 'correctly unpacks with U* strings with latin-1 characters' do 'café'.unpack('U*').should == [99, 97, 102, 233] [99, 97, 102, 233].pack('U*').unpack('U*').should == [99, 97, 102, 233] end it 'correctly unpacks with U* strings with latin-2 characters' ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/to_sym_spec.rb
Ruby
mit
4,915
master
202
# backtick_javascript: true require 'spec_helper' describe 'String#to_sym' do it 'returns a string literal' do str = "string" sym = str.to_sym `typeof(sym)`.should == 'string' end end
github
opal/opal
https://github.com/opal/opal
spec/opal/core/string/each_byte_spec.rb
Ruby
mit
4,915
master
459
require 'spec_helper' describe "String#each_byte" do it "get bytes from UTF-8 character (2 bytes)" do a = [] "ʆ".each_byte { |c| a << c } a.should == [202, 134] end it "get bytes from UTF-8 character (3 bytes)" do a = [] "ቜ".each_byte { |c| a << c } a.should == [225, 137, 156] end it ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/regexp/match_spec.rb
Ruby
mit
4,915
master
1,939
# backtick_javascript: true describe 'Regexp#match' do describe 'when pos is not specified' do it 'calls .exec only once on the current object' do regexp = /test/ calls = 0 %x( regexp._exec = regexp.exec; regexp.exec = function(str) { var match = this._exec(str); ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/regexp/assertions_spec.rb
Ruby
mit
4,915
master
465
describe 'Regexp assertions' do it 'matches the beginning of input' do /\Atext/.should =~ 'text' /\Atext/.should_not =~ 'the text' regexp = Regexp.new('\Atext') regexp.should =~ 'text' regexp.should_not =~ 'the text' end it 'matches the end of input' do /text\z/.should =~ 'the text' ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/regexp/interpolation_spec.rb
Ruby
mit
4,915
master
825
describe 'Regexp interpolation' do it 'can interpolate other regexps' do a = /a/ /#{a}/.should =~ 'aaa' /a+/.should =~ 'aaa' /#{a}+/.should =~ 'aaa' /aa/.should =~ 'aaa' /#{a}a/.should =~ 'aaa' end it 'can interpolate objects' do a = Object.new def a.to_s; 'a'; end /#{a}/.sh...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/bridged_classes_spec.rb
Ruby
mit
4,915
master
8,016
# backtick_javascript: true require 'spec_helper' %x{ var bridge_class_demo = function(){}; bridge_class_demo.prototype.$foo = function() { return "bar" }; } class TopBridgedClassDemo < `bridge_class_demo` def some_bridged_method [1, 2, 3] end def method_missing(name, *args, &block) return :catched...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/loaded_spec.rb
Ruby
mit
4,915
master
702
# backtick_javascript: true describe 'Opal.loaded' do before do %w[foo bar baz].each do |module_name| `delete Opal.require_table[#{module_name}]` `Opal.loaded_features.splice(Opal.loaded_features.indexOf(#{module_name}))` end end it 'it works with multiple paths' do `Opal.loaded(['bar'])...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/truthy_spec.rb
Ruby
mit
4,915
master
1,231
# backtick_javascript: true class Boolean def self_as_an_object self end end class JsNil def <(other) `nil` end end describe "Opal truthyness" do it "should evaluate to true using js `true` as an object" do if true.self_as_an_object called = true end called.should be_true end ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/string_spec.rb
Ruby
mit
4,915
master
790
# backtick_javascript: true require 'spec_helper' describe "Runtime String helpers" do context 'Opal.str' do it 'sets the encoding boxing literal strings' do -> { `Opal.str("foo", 'UTF-8')` }.should_not raise_error end end context 'Opal.set_encoding' do it 'sets the encoding for...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/is_a_spec.rb
Ruby
mit
4,915
master
1,638
# backtick_javascript: true describe 'Opal.is_a' do describe 'Numeric/Number special cases' do [ [1, :Numeric, true], [1, :Number, true], [1, :Fixnum, true], [1, :Integer, true], [1, :Float, true], [1.2, :Numeric, true], [1.2, :Number, true], [1.2, :Fixnum, true],...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/main_methods_spec.rb
Ruby
mit
4,915
master
981
require 'spec_helper' $OPAL_TOP_LEVEL_OBJECT = self def self.some_main_method 3.142 end def some_top_level_method_is_defined 42 end define_method :some_other_main_method do 0.1618 end describe "Defining normal methods at the top level" do it "should define them on Object, not main" do $OPAL_TOP_LEVEL_O...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/rescue_spec.rb
Ruby
mit
4,915
master
882
# backtick_javascript: true describe "The rescue keyword" do context 'Opal::Raw::Error' do it 'handles raw js throws' do begin `throw { message: 'foo' }` nil rescue Opal::Raw::Error => e e.JS[:message] end.should == 'foo' end it 'handles other Opal error' do ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/method_missing_spec.rb
Ruby
mit
4,915
master
1,499
# backtick_javascript: true require "spec_helper" module MethodMissingSpecs class A def method_missing(mid, *args) [mid, args] end end class B def method_missing(mid, *args, &block) [mid, block] end end end class BridgedClass < `(function NativeConstructor(){})` end describe "me...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/constants_spec.rb
Ruby
mit
4,915
master
768
# backtick_javascript: true module RuntimeFixtures class A end class A::B module C end end module ModuleB end module ModuleA include ModuleB end end describe "Constants access via .$$ with dots (regression for #1418)" do it "allows to acces scopes on `Opal`" do `Opal.Object.$$.Run...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/runtime/exit_spec.rb
Ruby
mit
4,915
master
1,020
# backtick_javascript: true describe "Exit (Kernel#exit / Opal.exit())" do it "forwards the status code to Opal.exit(status)" do received_status { Kernel.exit }.should == 0 received_status { Kernel.exit(0) }.should == 0 received_status { Kernel.exit(1) }.should == 1 received_status { Kernel.exit(2) ...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/enumerable/collect_break_spec.rb
Ruby
mit
4,915
master
235
describe "Enumerable#collect" do class Test include Enumerable def each(&block) [1, 2, 3].each(&block) end end it "breaks out with the proper value" do Test.new.collect { break 42 }.should == 42 end end
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/instance_variables_spec.rb
Ruby
mit
4,915
master
2,543
describe "Kernel#instance_variables" do context 'for nil' do it 'returns blank array' do expect(nil.instance_variables).to eq([]) end end context 'for string' do it 'returns blank array' do expect(''.instance_variables).to eq([]) end end context 'for non-empty string' do it '...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/respond_to_spec.rb
Ruby
mit
4,915
master
322
# backtick_javascript: true class RespondToSpecs def foo end end describe "Kernel#respond_to?" do before :each do @a = RespondToSpecs.new end it "returns false if a method exists, but is marked with a '$$stub' property" do `#{@a}.$foo.$$stub = true` @a.respond_to?(:foo).should be_false end en...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/require_tree_spec.rb
Ruby
mit
4,915
master
626
describe 'Kernel.require_tree' do it 'loads all the files in a directory' do $ScratchPad = [] require_tree '../fixtures/require_tree_files' $ScratchPad.sort.should == ['file 1.rb', 'file 2.rb', 'file 3.rb', 'file 4.rb', 'file 5.rb', 'nested 1.rb', 'nested 2.rb', 'other 1.r...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/methods_spec.rb
Ruby
mit
4,915
master
540
module MethodsSpecs class Issue < Object def unique_method_name end end # Trigger stub generation Issue.new.unique_method_name end describe "Kernel#methods" do it "lists methods available on an object" do Object.new.methods.include?("puts").should == true end it "lists only singleton method...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/public_methods_spec.rb
Ruby
mit
4,915
master
650
module PublicMethodsSpecs class Parent def parent_method end end class Child < Parent def child_method end end end describe "Kernel#public_methods" do it "lists methods available on an object" do child = PublicMethodsSpecs::Child.new child.public_methods.include?("parent_method").sho...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/at_exit_spec.rb
Ruby
mit
4,915
master
1,400
# backtick_javascript: true module KernelExit extend self attr_accessor :status, :original_proc, :proc, :out self.original_proc = `Opal.exit` self.proc = `function(status){ #{KernelExit.status = `status`} }` def out_after_exit `Opal.exit = #{proc}` exit out ensure `Opal.exit = #{original_...
github
opal/opal
https://github.com/opal/opal
spec/opal/core/kernel/puts_spec.rb
Ruby
mit
4,915
master
2,518
describe "IO#puts" do before :each do @before_separator = $/ @io = IO.new(123) ScratchPad.record [] def @io.write(str) ScratchPad << str end end after :each do ScratchPad.clear @io.close if @io suppress_warning {$/ = @before_separator} end it "writes just a newline when...
github
opal/opal
https://github.com/opal/opal
spec/opal/compiler/irb_spec.rb
Ruby
mit
4,915
master
1,407
require 'spec_helper' require 'native' describe Opal::Compiler do describe "irb parser option" do it "creates Opal.irb_vars if it does not exist" do $global["Opal"].irb_vars = nil eval_js compile("0;nil", :irb => true) ($global["Opal"].irb_vars == nil).should be_false end it "does not...
github
opal/opal
https://github.com/opal/opal
spec/opal/compiler/unicode_spec.rb
Ruby
mit
4,915
master
270
require 'spec_helper' require 'opal-parser' describe Opal::Compiler do describe "unicode support" do it 'can compile code containing Unicode characters' do -> { Opal::Compiler.new("'こんにちは'; p 1").compile }.should_not raise_error end end end
github
opal/opal
https://github.com/opal/opal
spec/mspec-opal/runner.rb
Ruby
mit
4,915
master
4,014
# backtick_javascript: true require 'mspec-opal/formatters' class OSpecFilter def self.main @main ||= self.new end def initialize @filters = Set.new @seen = Set.new end def register if ENV['INVERT_RUNNING_MODE'] MSpec.register :include, self else MSpec.register :exclude, se...
github
opal/opal
https://github.com/opal/opal
spec/mspec-opal/formatters.rb
Ruby
mit
4,915
master
4,018
# backtick_javascript: true class BaseOpalFormatter def initialize(out=nil) @exception = @failure = false @exceptions = [] @count = 0 @examples = 0 @current_state = nil end def register MSpec.register :exception, self MSpec.register :before, self MSpec.register :after, se...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/delegate.rb
Ruby
mit
4,915
master
272
# NOTE: run bin/format-filters after changing this file opal_filter "Delegate" do fails "Delegator#!= is delegated in general" # Exception: Maximum call stack size exceeded fails "Delegator#== is delegated in general" # Exception: Maximum call stack size exceeded end
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/enumerable.rb
Ruby
mit
4,915
master
5,807
# NOTE: run bin/format-filters after changing this file opal_filter "Enumerable" do fails "Enumerable#all? when given a pattern argument ignores the block if there is an argument" # Expected warning to match: /given block not used/ but got: "" fails "Enumerable#any? when given a pattern argument ignores the block i...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/freeze.rb
Ruby
mit
4,915
master
6,580
# NOTE: run bin/format-filters after changing this file opal_unsupported_filter "freezing" do fails "FalseClass#to_s returns a frozen string" # Expected "false".frozen? to be truthy but was false fails "File.basename returns a new unfrozen String" # Expected "foo.rb" not to be identical to "foo.rb" fails "Frozen ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/bigdecimal.rb
Ruby
mit
4,915
master
30,656
# NOTE: run bin/format-filters after changing this file opal_filter "BigDecimal" do fails "BidDecimal#hash two BigDecimal objects with numerically equal values should have the same hash value" # Expected 417830 == 417834 to be truthy but was false fails "BidDecimal#hash two BigDecimal objects with the same value sh...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/stringscanner.rb
Ruby
mit
4,915
master
15,965
# NOTE: run bin/format-filters after changing this file opal_filter "StringScanner" do fails "StringScanner#<< concatenates the given argument to self and returns self" # NoMethodError: undefined method `<<' for #<StringScanner:0xb3490 @string="hello " @pos=0 @matched=nil @working="hello " @match=[]> fails "StringS...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/string.rb
Ruby
mit
4,915
master
51,249
# NOTE: run bin/format-filters after changing this file opal_filter "String" do fails "String#% %c raises error when a codepoint isn't representable in an encoding of a format string" # Expected RangeError (/out of char range/) but no exception was raised ("Ԇ" was returned) fails "String#% %c uses the encoding of t...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/complex.rb
Ruby
mit
4,915
master
1,279
# NOTE: run bin/format-filters after changing this file opal_filter "Complex" do fails "Complex#<=> returns 0, 1, or -1 if self and argument do not have imaginary part" # Expected nil == 1 to be truthy but was false fails "Complex#coerce returns an array containing other as Complex and self when other is a Numeric ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/random.rb
Ruby
mit
4,915
master
1,256
# NOTE: run bin/format-filters after changing this file opal_filter "Random" do fails "Random#bytes returns the same numeric output for a given huge seed across all implementations and platforms" # Expected "àË" == "_\x91" to be truthy but was false fails "Random#bytes returns the same numeric output for a given se...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/float.rb
Ruby
mit
4,915
master
8,692
# NOTE: run bin/format-filters after changing this file opal_filter "Float" do fails "Float constant MAX is 1.7976931348623157e+308" # Exception: Maximum call stack size exceeded fails "Float constant MIN is 2.2250738585072014e-308" # Expected 5e-324 == (1/4.49423283715579e+307) to be truthy but was false fails "...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/proc.rb
Ruby
mit
4,915
master
12,317
# NOTE: run bin/format-filters after changing this file opal_filter "Proc" do fails "Proc#<< composition is a lambda when parameter is lambda" # Expected #<Proc:0x58f9a>.lambda? to be truthy but was false fails "Proc#<< does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/integer.rb
Ruby
mit
4,915
master
12,995
# NOTE: run bin/format-filters after changing this file opal_filter "Integer" do fails "Integer is the class of both small and large integers" # Expected Number to be identical to Integer fails "Integer#& fixnum raises a TypeError when passed a Float" # Expected TypeError but no exception was raised (3 was returned...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/method.rb
Ruby
mit
4,915
master
14,469
# NOTE: run bin/format-filters after changing this file opal_filter "Method" do fails "Method#<< does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but no exception was raised (#<Proc:0x3c64> was returned) fails "Method#<< raises TypeError if passed not callable object...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/pack_unpack.rb
Ruby
mit
4,915
master
22,706
# NOTE: run bin/format-filters after changing this file opal_filter "String#unpack" do fails "String#unpack with format 'A' decodes into raw (ascii) string values" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false fails "String#unpack with format 'H' should make strings with US_ASCII...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/base64.rb
Ruby
mit
4,915
master
1,342
# NOTE: run bin/format-filters after changing this file opal_filter "Base64" do fails "Base64#decode64 returns a binary encoded string" # Expected #<Encoding:UTF-8> == #<Encoding:ASCII-8BIT> to be truthy but was false fails "Base64#decode64 returns the Base64-decoded version of the given string with wrong padding" ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/rational.rb
Ruby
mit
4,915
master
2,087
# NOTE: run bin/format-filters after changing this file opal_filter "Rational" do fails "Rational does not respond to new" # Expected NoMethodError but got: ArgumentError ([Rational#initialize] wrong number of arguments (given 1, expected 2)) fails "Rational#coerce coerces to Rational, when given a Complex" # Expec...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/ruby-32.rb
Ruby
mit
4,915
master
7,406
# NOTE: run bin/format-filters after changing this file opal_filter "Ruby 3.2" do fails "A block yielded a single Array does not autosplat single argument to required arguments when a keyword rest argument is present" # ArgumentError: expected kwargs fails "Fixnum is no longer defined" # Expected Object.const_defin...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/stringio.rb
Ruby
mit
4,915
master
856
# NOTE: run bin/format-filters after changing this file opal_filter "StringIO" do fails "StringIO#each when passed chomp returns each line with removed separator when called without block" # Expected ["a b \n" + "c d e|", "1 2 3 4 5\n" + "|", "the end"] == ["a b \n" + "c d e", "1 2 3 4 5\n", "the end"] to be truthy b...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/objectspace.rb
Ruby
mit
4,915
master
9,794
# NOTE: run bin/format-filters after changing this file opal_filter "ObjectSpace" do fails "ObjectSpace._id2ref converts an object id to a reference to the object" # NoMethodError: undefined method `_id2ref' for ObjectSpace fails "ObjectSpace._id2ref raises RangeError when an object could not be found" # Expected R...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/file.rb
Ruby
mit
4,915
master
6,754
# NOTE: run bin/format-filters after changing this file opal_filter "File" do fails "File.absolute_path accepts a second argument of a directory from which to resolve the path" # Expected "./ruby/core/file/ruby/core/file/absolute_path_spec.rb" == "ruby/core/file/absolute_path_spec.rb" to be truthy but was false fai...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/trace_point.rb
Ruby
mit
4,915
master
1,756
# NOTE: run bin/format-filters after changing this file opal_filter "TracePoint" do fails "TracePoint#inspect returns a String showing the event and thread for :thread_begin event" # RuntimeError: Only the :class event is supported fails "TracePoint#inspect returns a String showing the event and thread for :thread_...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/warnings.rb
Ruby
mit
4,915
master
2,015
# NOTE: run bin/format-filters after changing this file opal_filter "warnings" do fails "Array#join when $, is not nil warns" # Expected warning to match: /warning: \$, is set to non-nil value/ but got: "" fails "Constant resolution within methods with dynamically assigned constants returns the updated value when a...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/binding.rb
Ruby
mit
4,915
master
3,850
# NOTE: run bin/format-filters after changing this file opal_filter "Binding" do fails "Binding#clone is a shallow copy of the Binding object" # NoMethodError: undefined method `a' for #<BindingSpecs::Demo:0x3aa86 @secret=99> fails "Binding#clone returns a copy of the Binding object" # NoMethodError: undefined meth...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/pathname.rb
Ruby
mit
4,915
master
1,237
# NOTE: run bin/format-filters after changing this file opal_filter "Pathname" do fails "Pathname#/ appends a pathname to self" # NoMethodError: undefined method `/' for #<Pathname:0xb5bd8 @path="/usr"> fails "Pathname#inspect returns a consistent String" # Expected "#<Pathname:0x1e50 @path=\"/tmp\">" == "#<Pathnam...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/io.rb
Ruby
mit
4,915
master
1,010
# NOTE: run bin/format-filters after changing this file opal_filter "IO" do fails "IO::EAGAINWaitReadable combines Errno::EAGAIN and IO::WaitReadable" # NameError: uninitialized constant IO::EAGAINWaitReadable fails "IO::EAGAINWaitReadable is the same as IO::EWOULDBLOCKWaitReadable if Errno::EAGAIN is the same as E...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/class.rb
Ruby
mit
4,915
master
1,902
# NOTE: run bin/format-filters after changing this file opal_filter "Class" do fails "Class#allocate raises TypeError for #superclass" # Expected TypeError but no exception was raised (nil was returned) fails "Class#dup raises TypeError if called on BasicObject" # Expected TypeError (can't copy the root class) but ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/enumerator.rb
Ruby
mit
4,915
master
27,161
# NOTE: run bin/format-filters after changing this file opal_filter "Enumerator" do fails "Enumerator#feed can be called for each iteration" # NotImplementedError: Opal doesn't support Enumerator#feed fails "Enumerator#feed causes yield to return the value if called during iteration" # NotImplementedError: Opal doe...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/hash.rb
Ruby
mit
4,915
master
5,223
# NOTE: run bin/format-filters after changing this file opal_filter "Hash" do fails "Hash#== compares keys with eql? semantics" # Expected true to be false fails "Hash#== computes equality for complex recursive hashes" # Exception: Maximum call stack size exceeded fails "Hash#== computes equality for recursive ha...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/kernel.rb
Ruby
mit
4,915
master
78,160
# NOTE: run bin/format-filters after changing this file opal_filter "Kernel" do fails "Kernel#=== does not call #object_id nor #equal? but still returns true for #== or #=== on the same object" # Mock '#<Object:0x2514>' expected to receive object_id("any_args") exactly 0 times but received it 2 times fails "Kernel#...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/module.rb
Ruby
mit
4,915
master
42,920
# NOTE: run bin/format-filters after changing this file opal_filter "Module" do fails "Module#alias_method creates methods that are == to each other" # Expected #<Method: #<Class:0x3c38e>#uno (defined in #<Class:0x3c38e> in ruby/core/module/fixtures/classes.rb:214)> == #<Method: #<Class:0x3c38e>#public_one (defined i...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/marshal.rb
Ruby
mit
4,915
master
29,409
# NOTE: run bin/format-filters after changing this file opal_filter "Marshal" do fails "Marshal.dump ignores the recursion limit if the limit is negative" # ArgumentError: [Marshal.dump] wrong number of arguments (given 2, expected 1) fails "Marshal.dump raises a TypeError if dumping a Mutex instance" # Expected Ty...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/array.rb
Ruby
mit
4,915
master
9,346
# NOTE: run bin/format-filters after changing this file opal_filter "Array" do fails "Array#== compares with an equivalent Array-like object using #to_ary" # Expected false to be true fails "Array#== returns true for [NaN] == [NaN] because Array#== first checks with #equal? and NaN.equal?(NaN) is true" # Expected [...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/datetime.rb
Ruby
mit
4,915
master
10,865
# NOTE: run bin/format-filters after changing this file opal_filter "DateTime" do fails "DateTime#+ is able to add sub-millisecond precision values" # Expected 0 == 864864 to be truthy but was false fails "DateTime#- correctly calculates sub-millisecond time differences" # Expected 5097600 == 59.000001 to be truthy...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/exception.rb
Ruby
mit
4,915
master
31,208
# NOTE: run bin/format-filters after changing this file opal_filter "Exception" do fails "An Exception reaching the top level is printed on STDERR" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x830fa> fails "An Exception reaching the top level the Exception#cause is printed to STDERR with backtraces" # N...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/struct.rb
Ruby
mit
4,915
master
3,652
# NOTE: run bin/format-filters after changing this file opal_filter "Struct" do fails "Struct#dig returns the value by the index" # Expected nil == "one" to be truthy but was false fails "Struct#hash returns different hashes for structs with different values when using keyword_init: true" # NameError: wrong constan...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/singleton.rb
Ruby
mit
4,915
master
404
# NOTE: run bin/format-filters after changing this file opal_filter "Singleton" do fails "Singleton._load returns the singleton instance for anything passed in to subclass" # NoMethodError: undefined method `_load' for SingletonSpecs::MyClassChild fails "Singleton._load returns the singleton instance for anything p...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/unboundmethod.rb
Ruby
mit
4,915
master
6,555
# NOTE: run bin/format-filters after changing this file opal_filter "UnboundMethod" do fails "UnboundMethod#== considers methods through aliasing and visibility change equal" # Expected #<Method: Class#new (defined in Class in <internal:corelib/class.rb>:40)> == #<Method: Class#n (defined in #<Class:> in <internal:co...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/symbol.rb
Ruby
mit
4,915
master
504
# NOTE: run bin/format-filters after changing this file opal_filter "Symbol" do fails "Symbol#to_proc produces a Proc that always returns [[:req], [:rest]] for #parameters" # Expected [["rest", "args"], ["block", "block"]] == [["req"], ["rest"]] to be truthy but was false fails "Symbol#to_proc produces a Proc with ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/math.rb
Ruby
mit
4,915
master
366
# NOTE: run bin/format-filters after changing this file opal_filter "Math" do fails "Math.ldexp returns correct value that closes to the max value of double type" # Expected Infinity == 9.207889385574391e+307 to be truthy but was false fails "Math.log2 returns the natural logarithm of the argument" # Expected Infin...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/basicobject.rb
Ruby
mit
4,915
master
5,027
# NOTE: run bin/format-filters after changing this file opal_filter "BasicObject" do fails "BasicObject raises NoMethodError for nonexistent methods after #method_missing is removed" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0xb5dc8> fails "BasicObject#initialize does not accept arguments" # NoMethodEr...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/refinement.rb
Ruby
mit
4,915
master
3,565
# NOTE: run bin/format-filters after changing this file opal_filter "refinement" do fails "Refinement#import_methods doesn't import any methods if one of the arguments is not a module" # Expected TypeError but got: NoMethodError (undefined method `import_methods' for #<refinement:String@#<Module:0x42ca2>>) fails "R...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/main.rb
Ruby
mit
4,915
master
2,349
# NOTE: run bin/format-filters after changing this file opal_filter "main" do fails "main#include in a file loaded with wrapping includes the given Module in the load wrapper" # ArgumentError: [MSpecEnv#load] wrong number of arguments (given 2, expected 1) fails "main#private raises a NameError when at least one of...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/regexp.rb
Ruby
mit
4,915
master
16,426
# NOTE: run bin/format-filters after changing this file opal_filter "regular_expressions" do fails "MatchData#byteoffset accepts String as a reference to a named capture" # NoMethodError: undefined method `byteoffset' for #<MatchData "foobar" f:"foo" b:"bar"> fails "MatchData#byteoffset accepts Symbol as a referenc...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/cgi.rb
Ruby
mit
4,915
master
6,669
# NOTE: run bin/format-filters after changing this file opal_filter "CGI" do fails "CGI#http_header CGI#http_header when passed Hash includes Cookies in the @output_cookies field" # NoMethodError: undefined method `http_header' for #<CGI:0x98198 @output_cookies=["multiple", "cookies"]> fails "CGI#http_header CGI#ht...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/language.rb
Ruby
mit
4,915
master
56,266
# NOTE: run bin/format-filters after changing this file opal_filter "language" do fails "$LOAD_PATH.resolve_feature_path return nil if feature cannot be found" # NoMethodError: undefined method `resolve_feature_path' for [] fails "$LOAD_PATH.resolve_feature_path returns what will be loaded without actual loading, ....
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/numeric.rb
Ruby
mit
4,915
master
2,022
# NOTE: run bin/format-filters after changing this file opal_filter "Numeric" do fails "Numeric#clone does not change frozen status" # Expected false == true to be truthy but was false fails "Numeric#clone raises ArgumentError if passed freeze: false" # Expected ArgumentError (/can't unfreeze/) but no exception was...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/range.rb
Ruby
mit
4,915
master
17,166
# NOTE: run bin/format-filters after changing this file opal_filter "Range" do fails "Range#bsearch with Float values with a block returning negative, zero, positive numbers accepts (+/-)Float::INFINITY from the block" # TypeError: can't iterate from Float fails "Range#bsearch with Float values with a block returni...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/time.rb
Ruby
mit
4,915
master
32,140
# NOTE: run bin/format-filters after changing this file opal_filter "Time" do fails "Time#+ zone is a timezone object preserves time zone" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String fails "Time#- tracks microseconds from a Rational" # Expected 0 == 123456 to be...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/date.rb
Ruby
mit
4,915
master
13,283
# NOTE: run bin/format-filters after changing this file opal_filter "Date" do fails "Date constants defines MONTHNAMES" # Expected [nil, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "Unknown"] == [nil, "January", "February", ...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/encoding.rb
Ruby
mit
4,915
master
29,783
# NOTE: run bin/format-filters after changing this file opal_filter "Encoding" do fails "File.basename returns the basename with the same encoding as the original" # NameError: uninitialized constant Encoding::Windows_1250 fails "Hash literal does not change encoding of literal string keys during creation" # Expect...
github
opal/opal
https://github.com/opal/opal
spec/filters/bugs/set.rb
Ruby
mit
4,915
master
8,213
# NOTE: run bin/format-filters after changing this file opal_filter "Set" do fails "Set#& raises an ArgumentError when passed a non-Enumerable" # Expected ArgumentError but got: NoMethodError (undefined method `&' for #<Set: {a,b,c}>) fails "Set#& returns a new Set containing only elements shared by self and the pa...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/firefox/exception.rb
Ruby
mit
4,915
master
615
# NOTE: run bin/format-filters after changing this file opal_unsupported_filter "Exception" do fails "Exception#backtrace contains lines of the same format for each prior position in the stack" fails "Exception#backtrace sets each element to a String" fails "Exception#backtrace_locations sets each element to a Th...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/file.rb
Ruby
mit
4,915
master
319
# NOTE: run bin/format-filters after changing this file opal_filter "File" do fails "File.expand_path when HOME is set does not return a frozen string" # Expected "/rubyspec_home".frozen? to be falsy but was true fails "File.extname returns unfrozen strings" # Expected true == false to be truthy but was false end
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/marshal.rb
Ruby
mit
4,915
master
3,011
# NOTE: run bin/format-filters after changing this file opal_filter "Marshal" do fails "Marshal.dump Random returns a binary string" # Exception: Cannot create property '$$meta' on string 'Error when building Random marshal data undefined method `binread' for File' fails "Marshal.dump String big returns a binary st...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/kernel.rb
Ruby
mit
4,915
master
1,351
# NOTE: run bin/format-filters after changing this file opal_filter "Kernel" do fails "Kernel#Float converts Strings to floats without calling #to_f" # Exception: Cannot create property '$$meta' on string '10' fails "Kernel#String returns the same object if it is already a String" # Exception: Cannot create propert...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/exception.rb
Ruby
mit
4,915
master
717
# NOTE: run bin/format-filters after changing this file opal_filter "Exception" do fails "Invoking a method when the method is not available should omit the method_missing call from the backtrace for NameError" # Expected "file:///var/folders/lj/_64stkl97_x2wy7w567j8m5m0000gn/T/opal-system-runner20241010-53720-6w8bh1...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/binding.rb
Ruby
mit
4,915
master
668
# NOTE: run bin/format-filters after changing this file opal_filter "Binding" do fails "Binding#local_variable_get reads variables added later to the binding" # Exception: a is not defined fails "Binding#local_variable_set overwrites a local variable defined using eval()" # Exception: number is not defined fails ...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/time.rb
Ruby
mit
4,915
master
268
# NOTE: run bin/format-filters after changing this file opal_filter "Time" do fails "Time.at passed [Time, Numeric, format] not supported format does not try to convert format to Symbol with #to_sym" # Exception: Cannot create property '$$meta' on string 'usec' end
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/string.rb
Ruby
mit
4,915
master
13,231
# NOTE: run bin/format-filters after changing this file opal_filter "String" do fails "A singleton class has class String as the superclass of a String instance" # Exception: Cannot create property '$$meta' on string 'blah' fails "Ruby String interpolation creates a non-frozen String when # frozen-string-literal: t...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/deno/array.rb
Ruby
mit
4,915
master
491
# NOTE: run bin/format-filters after changing this file opal_filter "Array" do fails "Array#inspect does not call #to_s on a String returned from #inspect" # Exception: Cannot create property '$$meta' on string 'abc' fails "Array#join uses the widest common encoding when other strings are incompatible" # FrozenErro...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/safari/exception.rb
Ruby
mit
4,915
master
484
# NOTE: run bin/format-filters after changing this file opal_unsupported_filter "Exception" do fails "Exception#backtrace contains lines of the same format for each prior position in the stack" fails "Exception#backtrace returns an Array that can be updated" fails "Exception#backtrace returns the same array after...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/safari/float.rb
Ruby
mit
4,915
master
420
# NOTE: run bin/format-filters after changing this file opal_filter "Float" do fails "Float#fdiv performs floating-point division between self and an Integer" # Expected 8.900000000008007e-117 == 8.900000000008011e-117 to be truthy but was false fails "Float#quo performs floating-point division between self and an ...
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/safari/literal_regexp.rb
Ruby
mit
4,915
master
298
# NOTE: run bin/format-filters after changing this file opal_unsupported_filter "Literal Regexp" do fails "Literal Regexps handles a lookbehind with ss characters" fails "Literal Regexps supports (?<! ) (negative lookbehind)" fails "Literal Regexps supports (?<= ) (positive lookbehind)" end
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/bun/literal_regexp.rb
Ruby
mit
4,915
master
286
# NOTE: run bin/format-filters after changing this file opal_filter "Literal Regexp" do fails "Literal Regexps handles a lookbehind with ss characters" fails "Literal Regexps supports (?<! ) (negative lookbehind)" fails "Literal Regexps supports (?<= ) (positive lookbehind)" end
github
opal/opal
https://github.com/opal/opal
spec/filters/platform/bun/exception.rb
Ruby
mit
4,915
master
736
# NOTE: run bin/format-filters after changing this file opal_filter "Exception" do fails "Exception#backtrace contains lines of the same format for each prior position in the stack" fails "Exception#backtrace returns an Array that can be updated" fails "Exception#backtrace returns the same array after duping" f...