repo stringlengths 5 92 | file_url stringlengths 80 287 | file_path stringlengths 5 197 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:37:27 2026-01-04 17:58:21 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/base64.rb | spec/filters/bugs/base64.rb | # 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" ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/freeze.rb | spec/filters/bugs/freeze.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/enumerator.rb | spec/filters/bugs/enumerator.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/exception.rb | spec/filters/bugs/exception.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/class.rb | spec/filters/bugs/class.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/string.rb | spec/filters/bugs/string.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | true |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/ruby-32.rb | spec/filters/bugs/ruby-32.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/complex.rb | spec/filters/bugs/complex.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/trace_point.rb | spec/filters/bugs/trace_point.rb | # 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_... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/random.rb | spec/filters/bugs/random.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/enumerable.rb | spec/filters/bugs/enumerable.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/pathname.rb | spec/filters/bugs/pathname.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/nilclass.rb | spec/filters/bugs/nilclass.rb | # NOTE: run bin/format-filters after changing this file
opal_filter "NilClass" do
fails "NilClass#=~ returns nil matching any object" # Expected false to be nil
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/integer.rb | spec/filters/bugs/integer.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/datetime.rb | spec/filters/bugs/datetime.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/regexp.rb | spec/filters/bugs/regexp.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/cgi.rb | spec/filters/bugs/cgi.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/rational.rb | spec/filters/bugs/rational.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/module.rb | spec/filters/bugs/module.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | true |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/marshal.rb | spec/filters/bugs/marshal.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/objectspace.rb | spec/filters/bugs/objectspace.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/bigdecimal.rb | spec/filters/bugs/bigdecimal.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/stringscanner.rb | spec/filters/bugs/stringscanner.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/delegate.rb | spec/filters/bugs/delegate.rb | # 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
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/hash.rb | spec/filters/bugs/hash.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/singleton.rb | spec/filters/bugs/singleton.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/date.rb | spec/filters/bugs/date.rb | # 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", ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/symbol.rb | spec/filters/bugs/symbol.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/bugs/numeric.rb | spec/filters/bugs/numeric.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/float.rb | spec/filters/platform/bun/float.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/kernel.rb | spec/filters/platform/bun/kernel.rb | # NOTE: run bin/format-filters after changing this file
opal_filter "Kernel" do
fails "Kernel#caller includes core library methods defined in Ruby"
fails "Kernel#object_id returns the same value for two Symbol literals"
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/freeze.rb | spec/filters/platform/bun/freeze.rb | # NOTE: run bin/format-filters after changing this file
opal_filter "freezing" do
fails "Kernel#freeze on a Float has no effect since it is already frozen" # Expected false to be true
fails "Kernel#freeze on integers has no effect since they are already frozen" # Expected false to be true
fails "Kernel#freeze on ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/literal_regexp.rb | spec/filters/platform/bun/literal_regexp.rb | # 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
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/exception.rb | spec/filters/platform/bun/exception.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/bun/symbol.rb | spec/filters/platform/bun/symbol.rb | # NOTE: run bin/format-filters after changing this file
opal_filter "Symbol" do
fails "BasicObject#__id__ returns the same value for two Symbol literals" #
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/safari/float.rb | spec/filters/platform/safari/float.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/safari/kernel.rb | spec/filters/platform/safari/kernel.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Kernel" do
fails "Kernel#caller includes core library methods defined in Ruby"
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/safari/literal_regexp.rb | spec/filters/platform/safari/literal_regexp.rb | # 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
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/safari/exception.rb | spec/filters/platform/safari/exception.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/firefox/kernel.rb | spec/filters/platform/firefox/kernel.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Kernel" do
fails "Kernel#caller includes core library methods defined in Ruby"
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/firefox/exception.rb | spec/filters/platform/firefox/exception.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/array.rb | spec/filters/platform/deno/array.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/time.rb | spec/filters/platform/deno/time.rb | # 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
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/file.rb | spec/filters/platform/deno/file.rb | # 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
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/binding.rb | spec/filters/platform/deno/binding.rb | # 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 ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/kernel.rb | spec/filters/platform/deno/kernel.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/exception.rb | spec/filters/platform/deno/exception.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/string.rb | spec/filters/platform/deno/string.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/platform/deno/marshal.rb | spec/filters/platform/deno/marshal.rb | # 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... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/language.rb | spec/filters/unsupported/language.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "language" do
fails "Ruby String literals with a magic frozen comment produce different objects for literals with the same content in different files if the other file doesn't have the comment" # NoMethodError: undefined method `tmp' for ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/range.rb | spec/filters/unsupported/range.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Range" do
fails "Range#initialize is private" # Expected Range to have private instance method 'initialize' but it does not
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/thread.rb | spec/filters/unsupported/thread.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Thread" do
fails "The return keyword in a Thread raises a LocalJumpError if used to exit a thread" # NotImplementedError: Thread creation not available
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/struct.rb | spec/filters/unsupported/struct.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Struct" do
fails "Struct#initialize is private" # Expected StructClasses::Car to have private instance method 'initialize' but it does not
fails "Struct.new does not create a constant with symbol as first argument" # Expected true to b... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/basicobject.rb | spec/filters/unsupported/basicobject.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "BasicObject" do
fails "BasicObject#method_missing for a Class raises a NoMethodError when a private method is called" # Expected NoMethodError but no exception was raised ("class_private_method" was returned)
fails "BasicObject#method_... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/delegator.rb | spec/filters/unsupported/delegator.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Delegator" do
fails "SimpleDelegator.new doesn't forward private method calls even via send or __send__" # Expected NoMethodError but no exception was raised (["priv", 42] was returned)
fails "SimpleDelegator.new doesn't forward privat... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/privacy.rb | spec/filters/unsupported/privacy.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "privacy" do
fails "A method definition always resets the visibility to public for nested definitions at the toplevel" # Expected NoMethodError (/private/) but no exception was raised ("nested_method_in_toplevel_method" was returned)
fa... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | true |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/math.rb | spec/filters/unsupported/math.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Math" do
fails "Math#atanh is a private instance method" # Expected Math to have private instance method 'atanh' but it does not
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/array.rb | spec/filters/unsupported/array.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Array" do
fails "Array#[] raises a RangeError when the length is out of range of Fixnum" # Expected RangeError but no exception was raised ([2, 3, 4, 5, 6] was returned)
fails "Array#[] raises a RangeError when the start index is out o... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/set.rb | spec/filters/unsupported/set.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Set" do
fails "Set#eql? returns true when the passed argument is a Set and contains the same elements" # Expected #<Set: {1,2,3}> not to have same value or type as #<Set: {1,2,3}>
fails "Set#initialize is private" # Expected Set to hav... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/time.rb | spec/filters/unsupported/time.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Time" do
fails "Time#+ accepts arguments that can be coerced into Rational" # Mock '10' expected to receive to_r("any_args") exactly 1 times but received it 0 times
fails "Time#+ adds a negative Float" # Expected 700000 == 699999 to be... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/file.rb | spec/filters/unsupported/file.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "File" do
fails "File.join doesn't mutate the object when calling #to_str" # Mock 'usr' expected to receive to_str("any_args") exactly 1 times but received it 0 times
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/float.rb | spec/filters/unsupported/float.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Float" do
fails "Complex#/ with Fixnum raises a ZeroDivisionError when given zero" # Expected ZeroDivisionError but no exception was raised ((Infinity+Infinity*i) was returned)
fails "Complex#eql? returns false when the imaginary parts... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/kernel.rb | spec/filters/unsupported/kernel.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Kernel" do
fails "Kernel has private instance method Array()" # Expected Kernel to have private instance method 'Array' but it does not
fails "Kernel has private instance method Hash()" # Expected Kernel to have private instance method... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/bignum.rb | spec/filters/unsupported/bignum.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Bignum" do
fails "BasicObject#__id__ returns a different value for two Bignum literals" # Expected 4e+100 == 4e+100 to be falsy but was true
fails "Complex#== with Numeric returns true when self's imaginary part is 0 and the real part ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/usage_of_files.rb | spec/filters/unsupported/usage_of_files.rb | # NOTE: run bin/format-filters after changing this file
opal_filter "Specs that use temporary files" do
fails "A Symbol literal inherits the encoding of the magic comment and can have a binary encoding" # NoMethodError: undefined method `tmp' for #<MSpecEnv:0x94928>
fails "Kernel.printf formatting io is not specifi... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/enumerator.rb | spec/filters/unsupported/enumerator.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Enumerator" do
fails "Enumerator#rewind calls the enclosed object's rewind method if one exists" # Mock 'rewinder' expected to receive rewind("any_args") exactly 1 times but received it 0 times
fails "Enumerator#rewind clears a pending... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/class.rb | spec/filters/unsupported/class.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Class" do
fails "Class#initialize is private" # Expected Class to have private method 'initialize' but it does not
end
| ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/string.rb | spec/filters/unsupported/string.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "String" do
fails "BasicObject#__id__ returns a different value for two String literals" # Expected "hello" == "hello" to be falsy but was true
fails "Module#const_defined? returns true when passed a constant name with EUC-JP characters... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | true |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/matchdata.rb | spec/filters/unsupported/matchdata.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "MatchData" do
fails "MatchData#[Symbol] returns matches in the String's encoding" # ArgumentError: unknown encoding name - euc-jp
fails "MatchData#[Symbol] returns the last match when multiple named matches exist with the same name" # ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/enumerable.rb | spec/filters/unsupported/enumerable.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Enumerable" do
fails "Enumerable#chunk does not return elements for which the block returns :_separator" # Expected [[1, [1]], ["_separator", [2]], [1, [3, 3]], ["_separator", [2]], [1, [1]]] == [[1, [1]], [1, [3, 3]], [1, [1]]] to be tr... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/integer.rb | spec/filters/unsupported/integer.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Integer" do
fails "Integer#% bignum returns the modulus obtained from dividing self by the given argument" # Expected 0 == 18446744073709552000 to be truthy but was false
fails "Integer#& bignum raises a TypeError when passed a Float" ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/regexp.rb | spec/filters/unsupported/regexp.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Regexp" do
fails "Regexp#options does not include Regexp::FIXEDENCODING for a Regexp literal with the 'n' option" # NameError: uninitialized constant Regexp::FIXEDENCODING
fails "Regexp#options includes Regexp::FIXEDENCODING for a Rege... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/marshal.rb | spec/filters/unsupported/marshal.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Marshal" do
fails "Marshal.dump dumps subsequent appearances of a symbol as a link" # Expected "\x04\b[\a\"\x06a@\x06" == "\x04\b[\a:\x06a;\x00" to be truthy but was false
fails "Marshal.dump raises a TypeError if dumping a IO/File ins... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/hash.rb | spec/filters/unsupported/hash.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Hash" do
fails "Hash#[] compares key via hash" # Mock '0' expected to receive hash("any_args") exactly 1 times but received it 0 times (performance optimization)
fails "Hash#[]= duplicates and freezes string keys" # NotImplementedError... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/singleton.rb | spec/filters/unsupported/singleton.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Singleton" do
fails "Singleton#_dump returns an empty string from a singleton subclass" # NoMethodError: undefined method `_dump' for #<SingletonSpecs::MyClassChild:0x9dc>
fails "Singleton#_dump returns an empty string" # NoMethodError... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/filters/unsupported/symbol.rb | spec/filters/unsupported/symbol.rb | # NOTE: run bin/format-filters after changing this file
opal_unsupported_filter "Symbol" do
fails "A Symbol literal can be an empty string" # Expected "\"\"" == ":\"\"" to be truthy but was false
fails "A Symbol literal can be created by the %s-delimited expression" # Expected "\"foo bar\"" == ":\"foo bar\"" to be ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/dependency_resolver_spec.rb | spec/lib/dependency_resolver_spec.rb | require 'lib/spec_helper'
RSpec.describe Opal::Nodes::CallNode::DependencyResolver do
let(:compiler) { double(:compiler, dynamic_require_severity: :warning) }
it "resolves simple strings to themselves" do
expect(resolve s(:str, 'foo')).to eq('foo')
end
context "using a dynamic segment not supported" do
... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/project_spec.rb | spec/lib/project_spec.rb | require 'lib/spec_helper'
RSpec.describe Opal::Project do
context "when used by Builder" do
let(:builder) do
b = Opal::Builder.new
b.append_paths(__dir__+"/fixtures/project")
b
end
it "adds a project and adds a load path from Opalfile if a file is built" do
b = builder
b.bu... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/paths_spec.rb | spec/lib/paths_spec.rb | require 'lib/spec_helper'
RSpec.describe 'Opal.use_gem' do
# Coverage probably should be improved
it 'adds require_paths of a gem to Opal paths' do
begin
Opal.use_gem 'rake'
rescue Opal::GemNotFound => e
raise(e) unless e.gem_name == 'rake'
skip %(Will fail if GEM_HOME has "rake" in the ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/deprecations_spec.rb | spec/lib/deprecations_spec.rb | require 'lib/spec_helper'
require 'opal/deprecations'
RSpec.describe Opal::Deprecations do
subject { Object.new.extend described_class }
it 'defaults to warn' do
expect(subject).to receive(:warn)
subject.deprecation "there's a new api!"
end
it 'can be set to raise' do
subject.raise_on_deprecation... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/repl_spec.rb | spec/lib/repl_spec.rb | require 'lib/spec_helper'
require 'opal/repl'
RSpec.describe Opal::REPL do
describe '#eval_ruby' do
let(:input_and_output) { {
'puts 5' => "5\n=> nil\n",
'a = 1' => "=> 1\n",
'a += 1' => "=> 2\n",
'a + 3' => "=> 5\n",
'puts a + 3' => "5\n=>... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/cli_spec.rb | spec/lib/cli_spec.rb | require 'lib/spec_helper'
require 'opal/cli'
require 'opal/cli_options'
require 'stringio'
require 'tmpdir'
RSpec.describe Opal::CLI do
let(:file) { File.expand_path('../fixtures/opal_file.rb', __FILE__) }
let(:options) { {} }
subject(:cli) { described_class.new(options) }
context 'with a file' do
let(... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/simple_server_spec.rb | spec/lib/simple_server_spec.rb | require 'lib/spec_helper'
require 'rack/test'
RSpec.describe Opal::SimpleServer do
include Rack::Test::Methods
attr_accessor :app
# Ensure that each `get` call leads to a new rack session.
def get(path)
rack_test_session(nil).get(path)
end
shared_examples "simple server" do
before do
Opal.... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/builder_processors_spec.rb | spec/lib/builder_processors_spec.rb | require 'lib/spec_helper'
require 'opal/builder/processor'
RSpec.describe Opal::Builder::Processor::JsProcessor do
it 'maps to one fragment per line' do
processor = described_class.new("line1\n line2\n line3", 'file.js')
expect(processor.source_map.fragments.map(&:code)).to eq([
"line1\n",
" lin... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/builder_spec.rb | spec/lib/builder_spec.rb | require 'lib/spec_helper'
require 'opal/os'
require 'opal/builder'
require 'opal/builder/scheduler/sequential'
require 'opal/builder/scheduler/threaded'
require 'tmpdir'
RSpec.describe Opal::Builder do
subject(:builder) { described_class.new(options) }
let(:builder_with_paths) { builder.append_paths(File.expand_pa... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/cli_runners_spec.rb | spec/lib/cli_runners_spec.rb | require 'lib/spec_helper'
require 'opal/cli_runners'
RSpec.describe Opal::CliRunners do
around do |example|
original_register = described_class.instance_variable_get :@register
example.run
described_class.instance_variable_set :@register, original_register
end
describe '.alias_runner' do
it 'ali... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/path_reader_spec.rb | spec/lib/path_reader_spec.rb | require 'lib/spec_helper'
require 'opal/path_reader'
RSpec.describe Opal::PathReader do
subject(:path_reader) { described_class.new }
let(:path) { 'opal_file' }
let(:full_path) { File.expand_path('../fixtures/opal_file.rb', __FILE__) }
let(:contents) { File.read(full_path, mode: "rb:UTF-8") }
before do
... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rake_dist_spec.rb | spec/lib/rake_dist_spec.rb | require 'lib/spec_helper'
require 'open3'
require 'opal/os'
RSpec.describe "rake dist" do
before :all do
system "rake dist >#{Opal::OS.dev_null}"
end
def run_with_node(code, precode:, requires:)
requires = requires.map do |i|
"require('./build/#{i}');"
end.join
code = "#{requires};#{preco... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/config_spec.rb | spec/lib/config_spec.rb | require 'lib/spec_helper'
require 'opal/config'
RSpec.describe Opal::Config do
before { described_class.reset! }
after { described_class.reset! }
describe '.default_config' do
it 'is new each time' do
default_config1 = described_class.default_config
default_config2 = described_class.default_conf... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/spec_helper.rb | spec/lib/spec_helper.rb | $VERBOSE = true
if ENV['CHECK_COVERAGE']
require 'coveralls'
Coveralls.wear!
end
if ENV['CHECK_COVERAGE_SIMPLECOV']
require 'simplecov'
SimpleCov.start
end
require 'opal'
ENV['OPAL_DISABLE_PREFORK_LOGS'] = '1'
$diagnostic_messages = []
Opal::Parser.default_parser_class.diagnostics_consumer = ->(diagnostic)... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/compiler_spec.rb | spec/lib/compiler_spec.rb | require 'lib/spec_helper'
require 'support/match_helpers'
RSpec.describe Opal::Compiler do
describe 'regexp' do
it 'should escape regexp' do
expect_compiled("%r{^/{4,}$}").to include('/^\/{4,}$/')
expect_compiled('/\\\\"/').to include('/\\\\"/')
end
end
describe 'requiring' do
it 'calls ... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/for_rewriter_spec.rb | spec/lib/rewriters/for_rewriter_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
require 'opal/rewriters/for_rewriter'
RSpec.describe Opal::Rewriters::ForRewriter do
include RewritersHelper
before(:each) { Opal::Rewriters::ForRewriter.reset_tmp_counter! }
include_examples 'it rewrites source-to-AST', 'for i in (0..3); for j in (4... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/dot_js_syntax_spec.rb | spec/lib/rewriters/dot_js_syntax_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
RSpec.describe Opal::Rewriters::DotJsSyntax do
include RewritersHelper
context '.JS. syntax' do
let(:send_node) do
# a.JS.b(1)
s(:send,
s(:send, s(:lvar, :a), :JS),
:b,
s(:int, 1)
)
end
let(:dot_js_... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/forward_args_spec.rb | spec/lib/rewriters/forward_args_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
require 'opal/rewriters/forward_args'
RSpec.describe Opal::Rewriters::ForwardArgs do
include RewritersHelper
before(:each) { Opal::Rewriters::ForRewriter.reset_tmp_counter! }
correct_names = proc do |ast|
case ast
when Opal::AST::Node
a... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/binary_operator_assignment_spec.rb | spec/lib/rewriters/binary_operator_assignment_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
RSpec.describe Opal::Rewriters::BinaryOperatorAssignment do
include RewritersHelper
use_only_described_rewriter!
before(:each) { Opal::Rewriters::BinaryOperatorAssignment.reset_tmp_counter! }
let(:cache_tmp_name) { :$binary_op_recvr_tmp_1 }
let(:... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/opal_engine_check_spec.rb | spec/lib/rewriters/opal_engine_check_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
RSpec.describe Opal::Rewriters::OpalEngineCheck do
include RewritersHelper
let(:opal_str_sexp) { s(:str, 'opal') }
let(:jruby_str_sexp) { s(:str, 'jruby') }
let(:true_branch) { s(:int, 1) }
let(:false_branch) { s(:int, 2) }
[:RUBY_ENGINE, :RUBY... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/block_to_iter_spec.rb | spec/lib/rewriters/block_to_iter_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
RSpec.describe Opal::Rewriters::BlockToIter do
include RewritersHelper
let(:block_node) do
# m { |arg1| 1 }
s(:block,
s(:send, nil, :m),
s(:args, s(:arg, :arg1)),
s(:int, 1)
)
end
let(:iter_node) do
s(:send, nil, :... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/numblocks_spec.rb | spec/lib/rewriters/numblocks_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
require 'opal/rewriters/numblocks'
RSpec.describe Opal::Rewriters::Numblocks do
include RewritersHelper
extend RewritersHelper # s() in example scope
correct_names = proc do |ast|
case ast
when Opal::AST::Node
ast.children.map do |i|
... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/js_reserved_words_spec.rb | spec/lib/rewriters/js_reserved_words_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
RSpec.describe Opal::Rewriters::JsReservedWords do
include RewritersHelper
reserved_lvars = %i(
do if in for let new try var case else enum eval false
null this true void with break catch class const super
throw while yield delete export imp... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
opal/opal | https://github.com/opal/opal/blob/b4e228990534515b83cd509a9297beca59bf8733/spec/lib/rewriters/returnable_logic_spec.rb | spec/lib/rewriters/returnable_logic_spec.rb | require 'lib/spec_helper'
require 'support/rewriters_helper'
require 'opal/rewriters/for_rewriter'
RSpec.describe Opal::Rewriters::ReturnableLogic do
include RewritersHelper
extend RewritersHelper
include_examples 'it rewrites source-to-AST', 'true or false', s(:if,
s(:lvasgn, "$ret_or_1", s(:true)),
s... | ruby | MIT | b4e228990534515b83cd509a9297beca59bf8733 | 2026-01-04T15:44:44.154940Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.