opal 1.6.0 → 1.7.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +17 -0
- data/CHANGELOG.md +15 -1
- data/Gemfile +2 -0
- data/HACKING.md +47 -26
- data/UNRELEASED.md +27 -0
- data/benchmark/benchmarks +415 -103
- data/benchmark/bm_call_overhead.yml +28 -0
- data/benchmark/run.rb +61 -40
- data/docs/cdp_common.json +3364 -0
- data/docs/cdp_common.md +18 -0
- data/docs/{headless_chrome.md → headless_browsers.md} +31 -12
- data/lib/opal/ast/builder.rb +1 -1
- data/lib/opal/builder.rb +8 -2
- data/lib/opal/builder_processors.rb +5 -3
- data/lib/opal/builder_scheduler.rb +1 -1
- data/lib/opal/cache.rb +1 -7
- data/lib/opal/cli_options.rb +72 -58
- data/lib/opal/cli_runners/chrome.rb +47 -9
- data/lib/opal/cli_runners/chrome_cdp_interface.rb +238 -112
- data/lib/opal/cli_runners/compiler.rb +146 -13
- data/lib/opal/cli_runners/deno.rb +32 -0
- data/lib/opal/cli_runners/firefox.rb +350 -0
- data/lib/opal/cli_runners/firefox_cdp_interface.rb +212 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.cmd +17 -0
- data/lib/opal/cli_runners/node_modules/.bin/chrome-remote-interface.ps1 +28 -0
- data/lib/opal/cli_runners/node_modules/.package-lock.json +41 -0
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/LICENSE +1 -1
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/README.md +322 -182
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/bin/client.js +99 -114
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/chrome-remote-interface.js +1 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/index.js +16 -11
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/api.js +41 -33
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/chrome.js +224 -214
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/devtools.js +71 -191
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/external-request.js +26 -6
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/protocol.json +20788 -9049
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/lib/websocket-wrapper.js +10 -3
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/package.json +59 -123
- data/lib/opal/cli_runners/node_modules/chrome-remote-interface/webpack.config.js +25 -32
- data/lib/opal/cli_runners/node_modules/commander/History.md +298 -0
- data/lib/opal/cli_runners/node_modules/commander/LICENSE +22 -0
- data/lib/opal/cli_runners/node_modules/commander/Readme.md +217 -61
- data/lib/opal/cli_runners/node_modules/commander/index.js +431 -145
- data/lib/opal/cli_runners/node_modules/commander/package.json +16 -79
- data/lib/opal/cli_runners/node_modules/ws/README.md +334 -98
- data/lib/opal/cli_runners/node_modules/ws/browser.js +8 -0
- data/lib/opal/cli_runners/node_modules/ws/index.js +5 -10
- data/lib/opal/cli_runners/node_modules/ws/lib/buffer-util.js +129 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/constants.js +10 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/event-target.js +184 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/extension.js +223 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/limiter.js +55 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/permessage-deflate.js +518 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/receiver.js +607 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/sender.js +409 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/stream.js +180 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/validation.js +104 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket-server.js +447 -0
- data/lib/opal/cli_runners/node_modules/ws/lib/websocket.js +1195 -0
- data/lib/opal/cli_runners/node_modules/ws/package.json +40 -106
- data/lib/opal/cli_runners/package-lock.json +62 -0
- data/lib/opal/cli_runners/package.json +1 -1
- data/lib/opal/cli_runners.rb +26 -4
- data/lib/opal/nodes/args/prepare_post_args.rb +2 -2
- data/lib/opal/nodes/def.rb +8 -8
- data/lib/opal/nodes/iter.rb +12 -12
- data/lib/opal/nodes/logic.rb +1 -1
- data/lib/opal/nodes/masgn.rb +2 -2
- data/lib/opal/parser/with_ruby_lexer.rb +1 -1
- data/lib/opal/paths.rb +14 -0
- data/lib/opal/rewriter.rb +2 -0
- data/lib/opal/rewriters/forward_args.rb +52 -4
- data/lib/opal/rewriters/targeted_patches.rb +94 -0
- data/lib/opal/version.rb +1 -1
- data/opal/corelib/basic_object.rb +1 -1
- data/opal/corelib/boolean.rb +2 -2
- data/opal/corelib/class.rb +11 -0
- data/opal/corelib/constants.rb +3 -3
- data/opal/corelib/enumerable.rb +4 -0
- data/opal/corelib/enumerator.rb +1 -1
- data/opal/corelib/hash.rb +2 -2
- data/opal/corelib/helpers.rb +1 -1
- data/opal/corelib/kernel.rb +3 -3
- data/opal/corelib/method.rb +1 -1
- data/opal/corelib/module.rb +29 -8
- data/opal/corelib/proc.rb +7 -5
- data/opal/corelib/runtime.js +141 -78
- data/opal/corelib/set.rb +252 -0
- data/opal/corelib/string.rb +2 -1
- data/opal/corelib/time.rb +2 -2
- data/opal/opal.rb +1 -0
- data/opal.gemspec +1 -0
- data/spec/filters/bugs/array.rb +22 -13
- data/spec/filters/bugs/base64.rb +5 -5
- data/spec/filters/bugs/basicobject.rb +16 -8
- data/spec/filters/bugs/bigdecimal.rb +161 -160
- data/spec/filters/bugs/binding.rb +10 -10
- data/spec/filters/bugs/class.rb +8 -8
- data/spec/filters/bugs/complex.rb +2 -1
- data/spec/filters/bugs/date.rb +79 -81
- data/spec/filters/bugs/datetime.rb +29 -29
- data/spec/filters/bugs/delegate.rb +1 -3
- data/spec/filters/bugs/encoding.rb +69 -69
- data/spec/filters/bugs/enumerable.rb +22 -20
- data/spec/filters/bugs/enumerator.rb +88 -85
- data/spec/filters/bugs/exception.rb +46 -40
- data/spec/filters/bugs/file.rb +32 -32
- data/spec/filters/bugs/float.rb +26 -21
- data/spec/filters/bugs/freeze.rb +88 -0
- data/spec/filters/bugs/hash.rb +39 -38
- data/spec/filters/bugs/integer.rb +57 -44
- data/spec/filters/bugs/io.rb +1 -1
- data/spec/filters/bugs/kernel.rb +349 -269
- data/spec/filters/bugs/language.rb +220 -188
- data/spec/filters/bugs/main.rb +5 -3
- data/spec/filters/bugs/marshal.rb +38 -38
- data/spec/filters/bugs/math.rb +2 -1
- data/spec/filters/bugs/method.rb +73 -62
- data/spec/filters/bugs/module.rb +163 -143
- data/spec/filters/bugs/numeric.rb +6 -6
- data/spec/filters/bugs/objectspace.rb +16 -16
- data/spec/filters/bugs/openstruct.rb +1 -1
- data/spec/filters/bugs/pack_unpack.rb +51 -51
- data/spec/filters/bugs/pathname.rb +7 -7
- data/spec/filters/bugs/proc.rb +63 -63
- data/spec/filters/bugs/random.rb +7 -6
- data/spec/filters/bugs/range.rb +12 -9
- data/spec/filters/bugs/rational.rb +8 -7
- data/spec/filters/bugs/regexp.rb +49 -48
- data/spec/filters/bugs/ruby-32.rb +56 -0
- data/spec/filters/bugs/set.rb +30 -30
- data/spec/filters/bugs/singleton.rb +4 -4
- data/spec/filters/bugs/string.rb +187 -99
- data/spec/filters/bugs/stringio.rb +7 -0
- data/spec/filters/bugs/stringscanner.rb +68 -68
- data/spec/filters/bugs/struct.rb +11 -9
- data/spec/filters/bugs/symbol.rb +1 -1
- data/spec/filters/bugs/time.rb +78 -63
- data/spec/filters/bugs/trace_point.rb +4 -4
- data/spec/filters/bugs/unboundmethod.rb +32 -17
- data/spec/filters/bugs/warnings.rb +8 -12
- data/spec/filters/unsupported/array.rb +24 -107
- data/spec/filters/unsupported/basicobject.rb +12 -12
- data/spec/filters/unsupported/bignum.rb +27 -52
- data/spec/filters/unsupported/class.rb +1 -2
- data/spec/filters/unsupported/delegator.rb +3 -3
- data/spec/filters/unsupported/enumerable.rb +2 -9
- data/spec/filters/unsupported/enumerator.rb +2 -11
- data/spec/filters/unsupported/file.rb +1 -1
- data/spec/filters/unsupported/float.rb +28 -47
- data/spec/filters/unsupported/hash.rb +8 -14
- data/spec/filters/unsupported/integer.rb +75 -91
- data/spec/filters/unsupported/kernel.rb +17 -35
- data/spec/filters/unsupported/language.rb +11 -19
- data/spec/filters/unsupported/marshal.rb +22 -41
- data/spec/filters/unsupported/matchdata.rb +28 -52
- data/spec/filters/unsupported/math.rb +1 -1
- data/spec/filters/unsupported/privacy.rb +229 -285
- data/spec/filters/unsupported/range.rb +1 -5
- data/spec/filters/unsupported/regexp.rb +40 -66
- data/spec/filters/unsupported/set.rb +2 -2
- data/spec/filters/unsupported/singleton.rb +4 -4
- data/spec/filters/unsupported/string.rb +305 -508
- data/spec/filters/unsupported/struct.rb +3 -4
- data/spec/filters/unsupported/symbol.rb +15 -18
- data/spec/filters/unsupported/thread.rb +1 -7
- data/spec/filters/unsupported/time.rb +159 -202
- data/spec/filters/unsupported/usage_of_files.rb +170 -259
- data/spec/lib/builder_spec.rb +14 -4
- data/spec/lib/rewriters/forward_args_spec.rb +32 -12
- data/spec/mspec-opal/runner.rb +2 -0
- data/spec/ruby_specs +4 -0
- data/stdlib/deno/base.rb +28 -0
- data/stdlib/deno/file.rb +340 -0
- data/stdlib/{headless_chrome.rb → headless_browser/base.rb} +1 -1
- data/stdlib/headless_browser/file.rb +15 -0
- data/stdlib/headless_browser.rb +4 -0
- data/stdlib/native.rb +1 -1
- data/stdlib/nodejs/file.rb +5 -0
- data/stdlib/opal/platform.rb +8 -6
- data/stdlib/opal-platform.rb +14 -8
- data/stdlib/set.rb +1 -258
- data/tasks/benchmarking.rake +62 -19
- data/tasks/building.rake +6 -2
- data/tasks/performance.rake +1 -1
- data/tasks/testing.rake +5 -3
- data/test/nodejs/test_file.rb +29 -10
- data/test/opal/http_server.rb +28 -11
- data/test/opal/unsupported_and_bugs.rb +2 -1
- metadata +92 -53
- data/lib/opal/cli_runners/node_modules/ultron/LICENSE +0 -22
- data/lib/opal/cli_runners/node_modules/ultron/index.js +0 -138
- data/lib/opal/cli_runners/node_modules/ultron/package.json +0 -112
- data/lib/opal/cli_runners/node_modules/ws/SECURITY.md +0 -33
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.fallback.js +0 -56
- data/lib/opal/cli_runners/node_modules/ws/lib/BufferUtil.js +0 -15
- data/lib/opal/cli_runners/node_modules/ws/lib/ErrorCodes.js +0 -28
- data/lib/opal/cli_runners/node_modules/ws/lib/EventTarget.js +0 -158
- data/lib/opal/cli_runners/node_modules/ws/lib/Extensions.js +0 -69
- data/lib/opal/cli_runners/node_modules/ws/lib/PerMessageDeflate.js +0 -339
- data/lib/opal/cli_runners/node_modules/ws/lib/Receiver.js +0 -520
- data/lib/opal/cli_runners/node_modules/ws/lib/Sender.js +0 -438
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.fallback.js +0 -9
- data/lib/opal/cli_runners/node_modules/ws/lib/Validation.js +0 -17
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocket.js +0 -705
- data/lib/opal/cli_runners/node_modules/ws/lib/WebSocketServer.js +0 -336
- data/spec/filters/bugs/boolean.rb +0 -3
- data/spec/filters/bugs/matrix.rb +0 -3
- data/spec/filters/unsupported/fixnum.rb +0 -15
- data/spec/filters/unsupported/freeze.rb +0 -102
- data/spec/filters/unsupported/pathname.rb +0 -4
- data/spec/filters/unsupported/proc.rb +0 -4
- data/spec/filters/unsupported/random.rb +0 -5
- data/spec/filters/unsupported/taint.rb +0 -162
@@ -1,78 +1,78 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "StringScanner" do
|
3
|
-
fails "StringScanner#<< concatenates the given argument to self and returns self"
|
4
|
-
fails "StringScanner#<< raises a TypeError if the given argument can't be converted to a String"
|
5
|
-
fails "StringScanner#<< when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:
|
6
|
-
fails "StringScanner#<< when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:
|
7
|
-
fails "StringScanner#[] raises a IndexError when there's no named capture"
|
8
|
-
fails "StringScanner#[] returns named capture"
|
3
|
+
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=[]>
|
4
|
+
fails "StringScanner#<< raises a TypeError if the given argument can't be converted to a String" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:0xb3488 @string="hello" @pos=0 @matched=nil @working="hello" @match=[]>)
|
5
|
+
fails "StringScanner#<< when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:0xb34a4 @string="" @pos=0 @matched=nil @working="" @match=[]>)
|
6
|
+
fails "StringScanner#<< when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `<<' for #<StringScanner:0xb34ac @string="hello world" @pos=0 @matched=nil @working="hello world" @match=[]>)
|
7
|
+
fails "StringScanner#[] raises a IndexError when there's no named capture" # Expected IndexError but no exception was raised (nil was returned)
|
8
|
+
fails "StringScanner#[] returns named capture" # Expected nil == "Fri" to be truthy but was false
|
9
9
|
fails "StringScanner#check treats String as the pattern itself" # Expected nil == "This" to be truthy but was false
|
10
10
|
fails "StringScanner#check_until raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but no exception was raised (nil was returned)
|
11
|
-
fails "StringScanner#clear set the scan pointer to the end of the string and clear matching data."
|
12
|
-
fails "StringScanner#clear warns in verbose mode that the method is obsolete"
|
13
|
-
fails "StringScanner#concat concatenates the given argument to self and returns self"
|
14
|
-
fails "StringScanner#concat raises a TypeError if the given argument can't be converted to a String"
|
15
|
-
fails "StringScanner#concat when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:
|
16
|
-
fails "StringScanner#concat when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:
|
17
|
-
fails "StringScanner#dup copies previous match state"
|
18
|
-
fails "StringScanner#empty? returns false if the scan pointer is not at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:
|
19
|
-
fails "StringScanner#empty? returns true if the scan pointer is at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:
|
20
|
-
fails "StringScanner#empty? warns in verbose mode that the method is obsolete"
|
11
|
+
fails "StringScanner#clear set the scan pointer to the end of the string and clear matching data." # NoMethodError: undefined method `clear' for #<StringScanner:0xb3478 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
12
|
+
fails "StringScanner#clear warns in verbose mode that the method is obsolete" # NoMethodError: undefined method `clear' for #<StringScanner:0xb346e @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
13
|
+
fails "StringScanner#concat concatenates the given argument to self and returns self" # NoMethodError: undefined method `concat' for #<StringScanner:0x5cc @string="hello " @pos=0 @matched=nil @working="hello " @match=[]>
|
14
|
+
fails "StringScanner#concat raises a TypeError if the given argument can't be converted to a String" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:0x5c4 @string="hello" @pos=0 @matched=nil @working="hello" @match=[]>)
|
15
|
+
fails "StringScanner#concat when passed an Integer doesn't call to_int on the argument" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:0x5e0 @string="" @pos=0 @matched=nil @working="" @match=[]>)
|
16
|
+
fails "StringScanner#concat when passed an Integer raises a TypeError" # Expected TypeError but got: NoMethodError (undefined method `concat' for #<StringScanner:0x5e8 @string="hello world" @pos=0 @matched=nil @working="hello world" @match=[]>)
|
17
|
+
fails "StringScanner#dup copies previous match state" # Expected nil == " " to be truthy but was false
|
18
|
+
fails "StringScanner#empty? returns false if the scan pointer is not at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:0x6a0 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
19
|
+
fails "StringScanner#empty? returns true if the scan pointer is at the end of the string" # NoMethodError: undefined method `empty?' for #<StringScanner:0x6a6 @string="This is a test" @pos=14 @matched=nil @working="" @match=nil>
|
20
|
+
fails "StringScanner#empty? warns in verbose mode that the method is obsolete" # NoMethodError: undefined method `empty?' for #<StringScanner:0x696 @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
21
21
|
fails "StringScanner#exist? raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but got: Exception (pattern.exec is not a function)
|
22
|
-
fails "StringScanner#getbyte is not multi-byte character sensitive"
|
23
|
-
fails "StringScanner#getbyte returns an instance of String when passed a String subclass"
|
24
|
-
fails "StringScanner#getbyte returns nil at the end of the string"
|
25
|
-
fails "StringScanner#getbyte scans one byte and returns it"
|
26
|
-
fails "StringScanner#getbyte warns in verbose mode that the method is obsolete"
|
27
|
-
fails "StringScanner#getch is multi-byte character sensitive"
|
28
|
-
fails "StringScanner#initialize converts the argument into a string using #to_str"
|
29
|
-
fails "StringScanner#inspect returns a string that represents the StringScanner object"
|
30
|
-
fails "StringScanner#matched returns the last matched string"
|
31
|
-
fails "StringScanner#matched? returns false if there's no match"
|
32
|
-
fails "StringScanner#matched? returns true if the last match was successful"
|
33
|
-
fails "StringScanner#peek raises a ArgumentError when the passed argument is negative"
|
34
|
-
fails "StringScanner#peek raises a RangeError when the passed argument is a Bignum"
|
35
|
-
fails "StringScanner#peek returns at most the specified number of bytes from the current position" # Expected "ét"
|
36
|
-
fails "StringScanner#peep raises a ArgumentError when the passed argument is negative"
|
37
|
-
fails "StringScanner#peep raises a RangeError when the passed argument is a Bignum"
|
38
|
-
fails "StringScanner#peep returns an empty string when the passed argument is zero"
|
39
|
-
fails "StringScanner#peep returns an instance of String when passed a String subclass"
|
40
|
-
fails "StringScanner#peep returns at most the specified number of bytes from the current position" # NoMethodError: undefined method `peep' for #<StringScanner:
|
41
|
-
fails "StringScanner#peep warns in verbose mode that the method is obsolete"
|
42
|
-
fails "StringScanner#pointer returns 0 in the reset position"
|
43
|
-
fails "StringScanner#pointer returns the length of the string in the terminate position"
|
44
|
-
fails "StringScanner#pointer returns the position of the scan pointer"
|
45
|
-
fails "StringScanner#pointer= modify the scan pointer"
|
46
|
-
fails "StringScanner#pointer= positions from the end if the argument is negative"
|
47
|
-
fails "StringScanner#pointer= raises a RangeError if position too far backward"
|
48
|
-
fails "StringScanner#pointer= raises a RangeError when the passed argument is out of range"
|
49
|
-
fails "StringScanner#pos= raises a RangeError if position too far backward"
|
50
|
-
fails "StringScanner#pos= raises a RangeError when the passed argument is out of range"
|
51
|
-
fails "StringScanner#restsize is equivalent to rest.size"
|
52
|
-
fails "StringScanner#restsize returns the length of the rest of the string" # NoMethodError: undefined method `restsize' for #<StringScanner:
|
53
|
-
fails "StringScanner#restsize warns in verbose mode that the method is obsolete"
|
22
|
+
fails "StringScanner#getbyte is not multi-byte character sensitive" # NoMethodError: undefined method `getbyte' for #<StringScanner:0xb3f58 @string="¤¢" @pos=0 @matched=nil @working="¤¢" @match=[]>
|
23
|
+
fails "StringScanner#getbyte returns an instance of String when passed a String subclass" # NoMethodError: undefined method `getbyte' for #<StringScanner:0xb3f46 @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
24
|
+
fails "StringScanner#getbyte returns nil at the end of the string" # NoMethodError: undefined method `getbyte' for #<StringScanner:0xb3f4c @string="" @pos=0 @matched=nil @working="" @match=[]>
|
25
|
+
fails "StringScanner#getbyte scans one byte and returns it" # NoMethodError: undefined method `getbyte' for #<StringScanner:0xb3f52 @string="abc5." @pos=0 @matched=nil @working="abc5." @match=[]>
|
26
|
+
fails "StringScanner#getbyte warns in verbose mode that the method is obsolete" # NoMethodError: undefined method `getbyte' for #<StringScanner:0xb3f5e @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
27
|
+
fails "StringScanner#getch is multi-byte character sensitive" # ArgumentError: unknown encoding name - euc-jp
|
28
|
+
fails "StringScanner#initialize converts the argument into a string using #to_str" # Expected #<MockObject:0xb3788 @name="str", @null=nil> == "test" to be truthy but was false
|
29
|
+
fails "StringScanner#inspect returns a string that represents the StringScanner object" # Expected "#<StringScanner:0x572 @string=\"This is a test\" @pos=0 @matched=nil @working=\"This is a test\" @match=[]>" == "#<StringScanner 0/14 @ \"This ...\">" to be truthy but was false
|
30
|
+
fails "StringScanner#matched returns the last matched string" # Expected nil == "This" to be truthy but was false
|
31
|
+
fails "StringScanner#matched? returns false if there's no match" # NoMethodError: undefined method `matched?' for #<StringScanner:0xb3554 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
32
|
+
fails "StringScanner#matched? returns true if the last match was successful" # NoMethodError: undefined method `matched?' for #<StringScanner:0xb355a @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[] @prev_pos=0>
|
33
|
+
fails "StringScanner#peek raises a ArgumentError when the passed argument is negative" # Expected ArgumentError but no exception was raised ("" was returned)
|
34
|
+
fails "StringScanner#peek raises a RangeError when the passed argument is a Bignum" # Expected RangeError but no exception was raised ("This is a test" was returned)
|
35
|
+
fails "StringScanner#peek returns at most the specified number of bytes from the current position" # Expected "ét" == "é" to be truthy but was false
|
36
|
+
fails "StringScanner#peep raises a ArgumentError when the passed argument is negative" # Expected ArgumentError but got: NoMethodError (undefined method `peep' for #<StringScanner:0xb36ba @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>)
|
37
|
+
fails "StringScanner#peep raises a RangeError when the passed argument is a Bignum" # Expected RangeError but got: NoMethodError (undefined method `peep' for #<StringScanner:0xb36a4 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>)
|
38
|
+
fails "StringScanner#peep returns an empty string when the passed argument is zero" # NoMethodError: undefined method `peep' for #<StringScanner:0xb36ae @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
39
|
+
fails "StringScanner#peep returns an instance of String when passed a String subclass" # NoMethodError: undefined method `peep' for #<StringScanner:0xb36c6 @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
40
|
+
fails "StringScanner#peep returns at most the specified number of bytes from the current position" # NoMethodError: undefined method `peep' for #<StringScanner:0xb36b4 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
41
|
+
fails "StringScanner#peep warns in verbose mode that the method is obsolete" # NoMethodError: undefined method `peep' for #<StringScanner:0xb369a @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
42
|
+
fails "StringScanner#pointer returns 0 in the reset position" # NoMethodError: undefined method `pointer' for #<StringScanner:0xb3618 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
43
|
+
fails "StringScanner#pointer returns the length of the string in the terminate position" # NoMethodError: undefined method `pointer' for #<StringScanner:0xb360e @string="This is a test" @pos=14 @matched=nil @working="" @match=nil>
|
44
|
+
fails "StringScanner#pointer returns the position of the scan pointer" # NoMethodError: undefined method `pointer' for #<StringScanner:0xb3612 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
45
|
+
fails "StringScanner#pointer= modify the scan pointer" # NoMethodError: undefined method `pointer=' for #<StringScanner:0xb3638 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
46
|
+
fails "StringScanner#pointer= positions from the end if the argument is negative" # NoMethodError: undefined method `pointer=' for #<StringScanner:0xb3632 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
47
|
+
fails "StringScanner#pointer= raises a RangeError if position too far backward" # Expected RangeError but got: NoMethodError (undefined method `pointer=' for #<StringScanner:0xb363e @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>)
|
48
|
+
fails "StringScanner#pointer= raises a RangeError when the passed argument is out of range" # Expected RangeError but got: NoMethodError (undefined method `pointer=' for #<StringScanner:0xb3628 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>)
|
49
|
+
fails "StringScanner#pos= raises a RangeError if position too far backward" # Expected RangeError but no exception was raised ("a test" was returned)
|
50
|
+
fails "StringScanner#pos= raises a RangeError when the passed argument is out of range" # Expected RangeError but no exception was raised ("" was returned)
|
51
|
+
fails "StringScanner#restsize is equivalent to rest.size" # NoMethodError: undefined method `restsize' for #<StringScanner:0xb394e @string="This is a test" @pos=4 @matched="This" @working=" is a test" @match=["This"] @prev_pos=0>
|
52
|
+
fails "StringScanner#restsize returns the length of the rest of the string" # NoMethodError: undefined method `restsize' for #<StringScanner:0xb3954 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
53
|
+
fails "StringScanner#restsize warns in verbose mode that the method is obsolete" # NoMethodError: undefined method `restsize' for #<StringScanner:0xb3944 @string="abc" @pos=0 @matched=nil @working="abc" @match=[]>
|
54
54
|
fails "StringScanner#scan raises a TypeError if pattern isn't a Regexp nor String" # Expected TypeError but no exception was raised (nil was returned)
|
55
55
|
fails "StringScanner#scan treats String as the pattern itself" # Expected nil == "This" to be truthy but was false
|
56
|
-
fails "StringScanner#scan with fixed_anchor: true returns the matched string" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2
|
57
|
-
fails "StringScanner#scan with fixed_anchor: true treats \\A as matching from the beginning of string" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2
|
58
|
-
fails "StringScanner#scan with fixed_anchor: true treats ^ as matching from the beginning of line" # ArgumentError: [StringScanner#initialize] wrong number of arguments(2
|
59
|
-
fails "StringScanner#scan_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
60
|
-
fails "StringScanner#scan_full returns the matched string if the third argument is true"
|
61
|
-
fails "StringScanner#scan_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
62
|
-
fails "StringScanner#scan_full returns the number of bytes advanced"
|
56
|
+
fails "StringScanner#scan with fixed_anchor: true returns the matched string" # ArgumentError: [StringScanner#initialize] wrong number of arguments (given 2, expected 1)
|
57
|
+
fails "StringScanner#scan with fixed_anchor: true treats \\A as matching from the beginning of string" # ArgumentError: [StringScanner#initialize] wrong number of arguments (given 2, expected 1)
|
58
|
+
fails "StringScanner#scan with fixed_anchor: true treats ^ as matching from the beginning of line" # ArgumentError: [StringScanner#initialize] wrong number of arguments (given 2, expected 1)
|
59
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true" # NoMethodError: undefined method `scan_full' for #<StringScanner:0x472 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
60
|
+
fails "StringScanner#scan_full returns the matched string if the third argument is true" # NoMethodError: undefined method `scan_full' for #<StringScanner:0x484 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
61
|
+
fails "StringScanner#scan_full returns the number of bytes advanced and advances the scan pointer if the second argument is true" # NoMethodError: undefined method `scan_full' for #<StringScanner:0x478 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
62
|
+
fails "StringScanner#scan_full returns the number of bytes advanced" # NoMethodError: undefined method `scan_full' for #<StringScanner:0x47e @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
63
63
|
fails "StringScanner#scan_until raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but no exception was raised (nil was returned)
|
64
|
-
fails "StringScanner#search_full raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but got: NoMethodError (undefined method `search_full' for #<StringScanner:
|
65
|
-
fails "StringScanner#search_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true"
|
66
|
-
fails "StringScanner#search_full returns the matched string if the third argument is true"
|
67
|
-
fails "StringScanner#search_full returns the number of bytes advanced and advances the scan pointer if the second argument is true"
|
68
|
-
fails "StringScanner#search_full returns the number of bytes advanced"
|
69
|
-
fails "StringScanner#size returns nil if there is no last match" # NoMethodError: undefined method `size' for #<StringScanner:
|
70
|
-
fails "StringScanner#size returns the number of captures groups of the last match" # NoMethodError: undefined method `size' for #<StringScanner:
|
64
|
+
fails "StringScanner#search_full raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but got: NoMethodError (undefined method `search_full' for #<StringScanner:0xb4016 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>)
|
65
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true and advances the scan pointer if the second argument is true" # NoMethodError: undefined method `search_full' for #<StringScanner:0xb4032 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
66
|
+
fails "StringScanner#search_full returns the matched string if the third argument is true" # NoMethodError: undefined method `search_full' for #<StringScanner:0xb4020 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
67
|
+
fails "StringScanner#search_full returns the number of bytes advanced and advances the scan pointer if the second argument is true" # NoMethodError: undefined method `search_full' for #<StringScanner:0xb4026 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
68
|
+
fails "StringScanner#search_full returns the number of bytes advanced" # NoMethodError: undefined method `search_full' for #<StringScanner:0xb402c @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
69
|
+
fails "StringScanner#size returns nil if there is no last match" # NoMethodError: undefined method `size' for #<StringScanner:0x318 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
70
|
+
fails "StringScanner#size returns the number of captures groups of the last match" # NoMethodError: undefined method `size' for #<StringScanner:0x31e @string="This is a test" @pos=3 @matched="Thi" @working="s is a test" @match=["Thi", "T", "h", "i"] @prev_pos=0>
|
71
71
|
fails "StringScanner#skip_until raises TypeError if given a String" # Expected TypeError (wrong argument type String (expected Regexp)) but no exception was raised (nil was returned)
|
72
|
-
fails "StringScanner#string returns the string being scanned"
|
73
|
-
fails "StringScanner#string= changes the string being scanned to the argument and resets the scanner"
|
74
|
-
fails "StringScanner#string= converts the argument into a string using #to_str"
|
75
|
-
fails "StringScanner#unscan raises a ScanError when the previous match had failed"
|
76
|
-
fails "StringScanner#unscan set the scan pointer to the previous position"
|
77
|
-
fails "StringScanner.must_C_version returns self"
|
72
|
+
fails "StringScanner#string returns the string being scanned" # NoMethodError: undefined method `<<' for #<StringScanner:0x344 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
73
|
+
fails "StringScanner#string= changes the string being scanned to the argument and resets the scanner" # NoMethodError: undefined method `string=' for #<StringScanner:0x360 @string="This is a test" @pos=0 @matched=nil @working="This is a test" @match=[]>
|
74
|
+
fails "StringScanner#string= converts the argument into a string using #to_str" # Mock 'str' expected to receive to_str("any_args") exactly 1 times but received it 0 times
|
75
|
+
fails "StringScanner#unscan raises a ScanError when the previous match had failed" # NameError: uninitialized constant ScanError
|
76
|
+
fails "StringScanner#unscan set the scan pointer to the previous position" # Expected "This" == nil to be truthy but was false
|
77
|
+
fails "StringScanner.must_C_version returns self" # NoMethodError: undefined method `must_C_version' for StringScanner
|
78
78
|
end
|
data/spec/filters/bugs/struct.rb
CHANGED
@@ -3,15 +3,17 @@ opal_filter "Struct" do
|
|
3
3
|
fails "Struct#dig returns the value by the index" # Expected nil == "one" to be truthy but was false
|
4
4
|
fails "Struct#hash returns different hashes for structs with different values when using keyword_init: true" # NameError: wrong constant name 1 non symbol member
|
5
5
|
fails "Struct#hash returns the same integer for structs with the same content" # Expected "Hash" (String) to be kind of Integer
|
6
|
-
fails "Struct#
|
7
|
-
fails "Struct#to_h with block
|
8
|
-
fails "Struct#to_h with block
|
9
|
-
fails "Struct#to_h with block
|
10
|
-
fails "Struct#to_h with block raises
|
11
|
-
fails "Struct
|
12
|
-
fails "Struct
|
13
|
-
fails "Struct.new raises
|
14
|
-
fails "Struct.new raises
|
6
|
+
fails "Struct#initialize warns about passing only keyword arguments" # Expected warning to match: /warning: Passing only keyword arguments/ but got: ""
|
7
|
+
fails "Struct#to_h with block coerces returned pair to Array with #to_ary" # NoMethodError: undefined method `args' for #<struct StructClasses::Car make=nil, model=nil, year=nil>
|
8
|
+
fails "Struct#to_h with block converts [key, value] pairs returned by the block to a hash" # NoMethodError: undefined method `args' for #<struct StructClasses::Car make="Ford", model="Ranger", year=nil>
|
9
|
+
fails "Struct#to_h with block does not coerce returned pair to Array with #to_a" # Expected TypeError (/wrong element type MockObject/) but got: NoMethodError (undefined method `args' for #<struct StructClasses::Car make=nil, model=nil, year=nil>)
|
10
|
+
fails "Struct#to_h with block raises ArgumentError if block returns longer or shorter array" # Expected ArgumentError (/element has wrong array length/) but got: NoMethodError (undefined method `args' for #<struct StructClasses::Car make=nil, model=nil, year=nil>)
|
11
|
+
fails "Struct#to_h with block raises TypeError if block returns something other than Array" # Expected TypeError (/wrong element type String/) but got: NoMethodError (undefined method `args' for #<struct StructClasses::Car make=nil, model=nil, year=nil>)
|
12
|
+
fails "Struct-based class#dup retains an included module in the ancestor chain for the struct's singleton class" # NoMethodError: undefined method `hello' for #<Module:0x776e4>
|
13
|
+
fails "Struct.new keyword_init: true option raises when there is a duplicate member" # Expected ArgumentError (duplicate member: foo) but no exception was raised (#<Class:0x76a42> was returned)
|
14
|
+
fails "Struct.new raises ArgumentError when there is a duplicate member" # Expected ArgumentError (duplicate member: foo) but no exception was raised (#<Class:0x769fa> was returned)
|
15
|
+
fails "Struct.new raises a TypeError or ArgumentError if passed a Hash with an unknown key" # Expected StandardError but no exception was raised (#<Class:0x76a0a> was returned)
|
16
|
+
fails "StructClass#keyword_init? returns nil for a struct that did not explicitly specify keyword_init" # Expected false to be nil
|
15
17
|
fails_badly "Struct#hash returns different hashes for different struct classes" # A failure in Chromium that once passes, other times it doesn't, most probably related to some kind of undeterminism.
|
16
18
|
fails_badly "Struct#hash returns different hashes for structs with different values" # Ditto
|
17
19
|
end
|
data/spec/filters/bugs/symbol.rb
CHANGED
@@ -2,5 +2,5 @@
|
|
2
2
|
opal_filter "Symbol" do
|
3
3
|
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
|
4
4
|
fails "Symbol#to_proc produces a Proc with arity -2" # Expected -1 == -2 to be truthy but was false
|
5
|
-
fails "Symbol#to_proc returns a Proc with #lambda? true" # Expected #<Proc:
|
5
|
+
fails "Symbol#to_proc returns a Proc with #lambda? true" # Expected #<Proc:0x45a30>.lambda? to be truthy but was false
|
6
6
|
end
|
data/spec/filters/bugs/time.rb
CHANGED
@@ -1,117 +1,132 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "Time" do
|
3
|
-
fails "Time#+ zone is a timezone object preserves time zone" # ArgumentError: Opal
|
4
|
-
fails "Time#- tracks microseconds from a Rational" # Expected 0 to
|
5
|
-
fails "Time#- zone is a timezone object preserves time zone" # ArgumentError: Opal
|
3
|
+
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
|
4
|
+
fails "Time#- tracks microseconds from a Rational" # Expected 0 == 123456 to be truthy but was false
|
5
|
+
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
|
6
6
|
fails "Time#ceil ceils to 0 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
7
7
|
fails "Time#ceil ceils to 2 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
8
8
|
fails "Time#ceil ceils to 4 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
9
9
|
fails "Time#ceil ceils to 7 decimal places with an explicit argument" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
10
10
|
fails "Time#ceil copies own timezone to the returning value" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
11
11
|
fails "Time#ceil defaults to ceiling to 0 places" # NoMethodError: undefined method `ceil' for 2010-03-30 05:43:25 UTC
|
12
|
-
fails "Time#ceil returns an instance of Time, even if #ceil is called on a subclass" # Expected Time to be identical to #<Class:
|
13
|
-
fails "Time#dup returns a clone of Time instance"
|
12
|
+
fails "Time#ceil returns an instance of Time, even if #ceil is called on a subclass" # Expected Time to be identical to #<Class:0xa40e6>
|
13
|
+
fails "Time#dup returns a clone of Time instance" # NoMethodError: undefined method `now' for #<Module:0x133b8>
|
14
14
|
fails "Time#floor copies own timezone to the returning value" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
15
15
|
fails "Time#floor defaults to flooring to 0 places" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
16
16
|
fails "Time#floor floors to 0 decimal places with an explicit argument" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
17
17
|
fails "Time#floor floors to 7 decimal places with an explicit argument" # NoMethodError: undefined method `floor' for 2010-03-30 05:43:25 UTC
|
18
|
-
fails "Time#floor returns an instance of Time, even if #floor is called on a subclass" # Expected Time to be identical to #<Class:
|
19
|
-
fails "Time#getlocal raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
|
18
|
+
fails "Time#floor returns an instance of Time, even if #floor is called on a subclass" # Expected Time to be identical to #<Class:0x10b74>
|
19
|
+
fails "Time#getlocal raises ArgumentError if the String argument is not in an ASCII-compatible encoding" # Expected ArgumentError but got: NoMethodError (undefined method `getlocal' for 2022-12-07 05:21:15 +0100)
|
20
20
|
fails "Time#getlocal with a timezone argument accepts timezone argument that must have #local_to_utc and #utc_to_local methods" # Expected to not get Exception but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
21
21
|
fails "Time#getlocal with a timezone argument does not raise exception if timezone does not implement #local_to_utc method" # Expected to not get Exception but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
22
22
|
fails "Time#getlocal with a timezone argument raises TypeError if timezone does not implement #utc_to_local method" # Expected TypeError (/can't convert \w+ into an exact number/) but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
23
23
|
fails "Time#getlocal with a timezone argument returns a Time in the timezone" # NoMethodError: undefined method `getlocal' for 2000-01-01 12:00:00 UTC
|
24
24
|
fails "Time#getlocal with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object if passed zone name as a timezone argument" # NoMethodError: undefined method `getlocal' for 2000-01-01 12:00:00 UTC
|
25
25
|
fails "Time#getlocal with a timezone argument subject's class implements .find_timezone method does not call .find_timezone if passed any not string/numeric/timezone timezone argument" # Expected TypeError (/can't convert \w+ into an exact number/) but got: NoMethodError (undefined method `getlocal' for 2000-01-01 12:00:00 UTC)
|
26
|
-
fails "Time#gmtime converts self to UTC, modifying the receiver" # Expected 2007-01-09
|
26
|
+
fails "Time#gmtime converts self to UTC, modifying the receiver" # Expected 2007-01-09 05:00:00 UTC == 2007-01-09 12:00:00 UTC to be truthy but was false
|
27
27
|
fails "Time#hash returns an Integer" # Expected "Time:100000" (String) to be an instance of Integer
|
28
28
|
fails "Time#inspect omits trailing zeros from microseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.1 UTC" to be truthy but was false
|
29
29
|
fails "Time#inspect preserves microseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456 UTC" to be truthy but was false
|
30
30
|
fails "Time#inspect preserves nanoseconds" # Expected "2007-11-01 15:25:00 UTC" == "2007-11-01 15:25:00.123456789 UTC" to be truthy but was false
|
31
31
|
fails "Time#inspect uses the correct time zone with microseconds" # NoMethodError: undefined method `localtime' for 2000-01-01 00:00:00 UTC
|
32
32
|
fails "Time#inspect uses the correct time zone without microseconds" # NoMethodError: undefined method `localtime' for 2000-01-01 00:00:00 UTC
|
33
|
-
fails "Time#localtime raises ArgumentError if the String argument is not in an ASCII-compatible encoding"
|
33
|
+
fails "Time#localtime raises ArgumentError if the String argument is not in an ASCII-compatible encoding" # Expected ArgumentError but got: NoMethodError (undefined method `localtime' for 2022-12-07 05:21:43 +0100)
|
34
34
|
fails "Time#nsec returns a positive value for dates before the epoch" # NoMethodError: undefined method `nsec' for 1969-11-12 13:18:57 UTC
|
35
|
-
fails "Time#round copies own timezone to the returning value"
|
36
|
-
fails "Time#round defaults to rounding to 0 places"
|
37
|
-
fails "Time#round returns an instance of Time, even if #round is called on a subclass"
|
38
|
-
fails "Time#round rounds to 0 decimal places with an explicit argument"
|
39
|
-
fails "Time#round rounds to 7 decimal places with an explicit argument"
|
40
|
-
fails "Time#strftime rounds an offset to the nearest second when formatting with %z"
|
41
|
-
fails "Time#strftime should be able to print the commercial year with leading zeroes"
|
42
|
-
fails "Time#strftime should be able to print the commercial year with only two digits"
|
35
|
+
fails "Time#round copies own timezone to the returning value" # NoMethodError: undefined method `round' for 2010-03-30 05:43:25 UTC
|
36
|
+
fails "Time#round defaults to rounding to 0 places" # NoMethodError: undefined method `round' for 2010-03-30 05:43:25 UTC
|
37
|
+
fails "Time#round returns an instance of Time, even if #round is called on a subclass" # Expected Time to be identical to #<Class:0x5990a>
|
38
|
+
fails "Time#round rounds to 0 decimal places with an explicit argument" # NoMethodError: undefined method `round' for 2010-03-30 05:43:25 UTC
|
39
|
+
fails "Time#round rounds to 7 decimal places with an explicit argument" # NoMethodError: undefined method `round' for 2010-03-30 05:43:25 UTC
|
40
|
+
fails "Time#strftime rounds an offset to the nearest second when formatting with %z" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
41
|
+
fails "Time#strftime should be able to print the commercial year with leading zeroes" # Expected "200" == "0200" to be truthy but was false
|
42
|
+
fails "Time#strftime should be able to print the commercial year with only two digits" # TypeError: no implicit conversion of Range into Integer
|
43
43
|
fails "Time#strftime should be able to show default Logger format" # Expected "2001-12-03T04:05:06.000000 " == "2001-12-03T04:05:06.100000 " to be truthy but was false
|
44
|
-
fails "Time#strftime should be able to show the commercial week day"
|
45
|
-
fails "Time#strftime should be able to show the number of seconds since the unix epoch" #
|
46
|
-
fails "Time#strftime should be able to show the timezone of the date with a : separator"
|
47
|
-
fails "Time#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)"
|
48
|
-
fails "Time#strftime
|
49
|
-
fails "Time#strftime with %N formats the
|
50
|
-
fails "Time#strftime with %N formats the
|
51
|
-
fails "Time#strftime with %N formats the nanoseconds of the second with %
|
52
|
-
fails "Time#strftime with %N formats the
|
44
|
+
fails "Time#strftime should be able to show the commercial week day" # Expected "1" == "7" to be truthy but was false
|
45
|
+
fails "Time#strftime should be able to show the number of seconds since the unix epoch" # Expected "1104534000" == "1104537600" to be truthy but was false
|
46
|
+
fails "Time#strftime should be able to show the timezone of the date with a : separator" # Expected "-0000" == "+0000" to be truthy but was false
|
47
|
+
fails "Time#strftime should be able to show the week number with the week starting on Sunday (%U) and Monday (%W)" # Expected "%U" == "14" to be truthy but was false
|
48
|
+
fails "Time#strftime supports RFC 3339 UTC for unknown offset local time, -0000, as %-z" # Expected "-0000" == "+0000" to be truthy but was false
|
49
|
+
fails "Time#strftime with %N formats the microseconds of the second with %6N" # Expected "000000" == "042000" to be truthy but was false
|
50
|
+
fails "Time#strftime with %N formats the milliseconds of the second with %3N" # Expected "000" == "050" to be truthy but was false
|
51
|
+
fails "Time#strftime with %N formats the nanoseconds of the second with %9N" # Expected "000000000" == "001234000" to be truthy but was false
|
52
|
+
fails "Time#strftime with %N formats the nanoseconds of the second with %N" # Expected "000000000" == "001234560" to be truthy but was false
|
53
|
+
fails "Time#strftime with %N formats the picoseconds of the second with %12N" # Expected "000000000000" == "999999999999" to be truthy but was false
|
53
54
|
fails "Time#subsec returns 0 as an Integer for a Time with a whole number of seconds" # NoMethodError: undefined method `subsec' for 1970-01-01 01:01:40 +0100
|
54
55
|
fails "Time#to_date yields accurate julian date for Julian-Gregorian gap value" # Expected 2299170 == 2299160 to be truthy but was false
|
55
56
|
fails "Time#to_date yields accurate julian date for ambiguous pre-Gregorian reform value" # Expected 2299160 == 2299150 to be truthy but was false
|
56
57
|
fails "Time#to_date yields accurate julian date for post-Gregorian reform value" # Expected 2299171 == 2299161 to be truthy but was false
|
57
58
|
fails "Time#to_date yields same julian day regardless of UTC time value" # Expected 2299171 == 2299161 to be truthy but was false
|
58
59
|
fails "Time#to_date yields same julian day regardless of local time or zone" # Expected 2299171 == 2299161 to be truthy but was false
|
59
|
-
fails "Time#to_f returns the float number of seconds + usecs since the epoch"
|
60
|
+
fails "Time#to_f returns the float number of seconds + usecs since the epoch" # Expected 100 == 100.0001 to be truthy but was false
|
60
61
|
fails "Time#to_i rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
|
61
62
|
fails "Time#tv_sec rounds fractional seconds toward zero" # Expected -315619200 == -315619199 to be truthy but was false
|
62
|
-
fails "Time#usec returns a positive value for dates before the epoch" # Expected 0 to
|
63
|
-
fails "Time#utc converts self to UTC, modifying the receiver" # Expected 2007-01-09
|
64
|
-
fails "Time#zone Encoding.default_internal is set returns an ASCII string"
|
65
|
-
fails "Time#zone defaults to UTC when bad zones given" # Expected 3600 to
|
63
|
+
fails "Time#usec returns a positive value for dates before the epoch" # Expected 0 == 404240 to be truthy but was false
|
64
|
+
fails "Time#utc converts self to UTC, modifying the receiver" # Expected 2007-01-09 05:00:00 UTC == 2007-01-09 12:00:00 UTC to be truthy but was false
|
65
|
+
fails "Time#zone Encoding.default_internal is set returns an ASCII string" # NoMethodError: undefined method `default_internal' for Encoding
|
66
|
+
fails "Time#zone defaults to UTC when bad zones given" # Expected 3600 == 0 to be truthy but was false
|
66
67
|
fails "Time.at :in keyword argument could be UTC offset as a String in '+HH:MM or '-HH:MM' format" # TypeError: no implicit conversion of Hash into Integer
|
67
68
|
fails "Time.at :in keyword argument could be UTC offset as a number of seconds" # TypeError: no implicit conversion of Hash into Integer
|
68
69
|
fails "Time.at :in keyword argument could be a timezone object" # TypeError: no implicit conversion of Hash into Integer
|
69
|
-
fails "Time.at
|
70
|
+
fails "Time.at :in keyword argument raises ArgumentError if format is invalid" # Expected ArgumentError but got: TypeError (no implicit conversion of Hash into Integer)
|
71
|
+
fails "Time.at passed Numeric passed BigDecimal doesn't round input value" # NoMethodError: undefined method `to_i' for 1.1
|
70
72
|
fails "Time.at passed Numeric passed Rational returns Time with correct microseconds" # Expected 0 == 539759 to be truthy but was false
|
71
73
|
fails "Time.at passed Numeric passed Rational returns Time with correct nanoseconds" # Expected 0 == 539759 to be truthy but was false
|
72
|
-
fails "Time.at passed Numeric roundtrips a Rational produced by #to_r"
|
73
|
-
fails "Time.at passed [Time, Numeric, format] :microsecond format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3
|
74
|
-
fails "Time.at passed [Time, Numeric, format] :millisecond format treats second argument as milliseconds" # ArgumentError: [Time.at] wrong number of arguments(3
|
75
|
-
fails "Time.at passed [Time, Numeric, format] :nanosecond format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3
|
76
|
-
fails "Time.at passed [Time, Numeric, format] :nsec format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments(3
|
77
|
-
fails "Time.at passed [Time, Numeric, format] :usec format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments(3
|
78
|
-
fails "Time.at passed [Time, Numeric, format] supports Float second argument" # ArgumentError: [Time.at] wrong number of arguments(3
|
74
|
+
fails "Time.at passed Numeric roundtrips a Rational produced by #to_r" # NoMethodError: undefined method `to_r' for 2022-12-07 05:21:14 +0100
|
75
|
+
fails "Time.at passed [Time, Numeric, format] :microsecond format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
76
|
+
fails "Time.at passed [Time, Numeric, format] :millisecond format treats second argument as milliseconds" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
77
|
+
fails "Time.at passed [Time, Numeric, format] :nanosecond format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
78
|
+
fails "Time.at passed [Time, Numeric, format] :nsec format treats second argument as nanoseconds" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
79
|
+
fails "Time.at passed [Time, Numeric, format] :usec format treats second argument as microseconds" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
80
|
+
fails "Time.at passed [Time, Numeric, format] supports Float second argument" # ArgumentError: [Time.at] wrong number of arguments (given 3, expected -2)
|
79
81
|
fails "Time.at passed non-Time, non-Numeric with an argument that responds to #to_r needs for the argument to respond to #to_int too" # Mock 'rational-but-no-to_int' expected to receive to_r("any_args") exactly 1 times but received it 0 times
|
80
|
-
fails "Time.gm handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC
|
82
|
+
fails "Time.gm handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC
|
81
83
|
fails "Time.gm raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 UTC was returned)
|
82
84
|
fails "Time.httpdate parses RFC-2616 strings" # NoMethodError: undefined method `httpdate' for Time
|
83
|
-
fails "Time.local raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 +
|
84
|
-
fails "Time.
|
85
|
-
fails "Time.
|
86
|
-
fails "Time.
|
87
|
-
fails "Time.new
|
88
|
-
fails "Time.new
|
89
|
-
fails "Time.new
|
90
|
-
fails "Time.new with a timezone argument
|
85
|
+
fails "Time.local raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 +0100 was returned)
|
86
|
+
fails "Time.local uses the 'CET' timezone with TZ=Europe/Amsterdam in 1970" # Expected [0, 0, 0, 16, 5, 1970, 6, 136, false, "Central European Standard Time"] == [0, 0, 0, 16, 5, 1970, 6, 136, false, "CET"] to be truthy but was false
|
87
|
+
fails "Time.mktime raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 +0100 was returned)
|
88
|
+
fails "Time.mktime uses the 'CET' timezone with TZ=Europe/Amsterdam in 1970" # Expected [0, 0, 0, 16, 5, 1970, 6, 136, false, "Central European Standard Time"] == [0, 0, 0, 16, 5, 1970, 6, 136, false, "CET"] to be truthy but was false
|
89
|
+
fails "Time.new has at least microsecond precision" # NoMethodError: undefined method `nsec' for 2022-12-07 05:20:59 +0100
|
90
|
+
fails "Time.new uses the 'CET' timezone with TZ=Europe/Amsterdam in 1970" # Expected [0, 0, 0, 16, 5, 1970, 6, 136, false, "Central European Standard Time"] == [0, 0, 0, 16, 5, 1970, 6, 136, false, "CET"] to be truthy but was false
|
91
|
+
fails "Time.new uses the local timezone" # Expected 3600 == -28800 to be truthy but was false
|
92
|
+
fails "Time.new with a timezone argument #name method cannot marshal Time if #name method isn't implemented" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
93
|
+
fails "Time.new with a timezone argument #name method uses the optional #name method for marshaling" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
94
|
+
fails "Time.new with a timezone argument :in keyword argument could be UTC offset as a String in '+HH:MM or '-HH:MM' format" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
95
|
+
fails "Time.new with a timezone argument :in keyword argument could be UTC offset as a number of seconds" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
96
|
+
fails "Time.new with a timezone argument :in keyword argument could be a timezone object" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
97
|
+
fails "Time.new with a timezone argument Time-like argument of #utc_to_local and #local_to_utc methods has attribute values the same as a Time object in UTC" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
98
|
+
fails "Time.new with a timezone argument Time-like argument of #utc_to_local and #local_to_utc methods implements subset of Time methods" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
91
99
|
fails "Time.new with a timezone argument accepts timezone argument that must have #local_to_utc and #utc_to_local methods" # Expected to not get Exception but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
92
100
|
fails "Time.new with a timezone argument does not raise exception if timezone does not implement #utc_to_local method" # Expected to not get Exception but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
93
|
-
fails "Time.new with a timezone argument raises TypeError if timezone does not implement #local_to_utc method" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal
|
101
|
+
fails "Time.new with a timezone argument raises TypeError if timezone does not implement #local_to_utc method" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
94
102
|
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be Time instance" # Expected to not get Exception but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
95
103
|
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be Time subclass instance" # Expected to not get Exception but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
96
104
|
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could be any object with #to_i method" # Expected to not get Exception but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
97
|
-
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could have any #zone and #utc_offset because they are ignored" # ArgumentError: Opal
|
98
|
-
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods leads to raising Argument error if difference between argument and result is too large" # Expected ArgumentError (utc_offset out of range) but got: ArgumentError (Opal
|
99
|
-
fails "Time.new with a timezone argument returns a Time in the timezone" # ArgumentError: Opal
|
100
|
-
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object at loading marshaled data" # ArgumentError: Opal
|
101
|
-
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object if passed zone name as a timezone argument" # ArgumentError:
|
102
|
-
fails "Time.new with a timezone argument subject's class implements .find_timezone method does not call .find_timezone if passed any not string/numeric/timezone timezone argument" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal
|
103
|
-
fails "Time.new with a timezone argument the #abbr method is used by '%Z' in #strftime" # ArgumentError: Opal
|
104
|
-
fails "Time.new with a utc_offset argument raises ArgumentError if the String argument is not in an ASCII-compatible encoding" # Expected ArgumentError but no exception was raised (
|
105
|
-
fails "Time.new with a utc_offset argument raises ArgumentError if the month is greater than 12" # Expected ArgumentError (/(mon|argument) out of range/) but got: ArgumentError (
|
106
|
-
fails "Time.new with a utc_offset argument raises ArgumentError if the utc_offset argument is greater than or equal to 10e9" # Expected ArgumentError but no exception was raised (
|
107
|
-
fails "Time.new with a utc_offset argument returns a Time with a UTC offset specified as +HH:MM:SS" # ArgumentError:
|
108
|
-
fails "Time.now
|
109
|
-
fails "Time.now
|
105
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods could have any #zone and #utc_offset because they are ignored" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
106
|
+
fails "Time.new with a timezone argument returned value by #utc_to_local and #local_to_utc methods leads to raising Argument error if difference between argument and result is too large" # Expected ArgumentError (utc_offset out of range) but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
107
|
+
fails "Time.new with a timezone argument returns a Time in the timezone" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
108
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object at loading marshaled data" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
109
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method calls .find_timezone to build a time object if passed zone name as a timezone argument" # ArgumentError: "+HH:MM", "-HH:MM", "UTC" expected for utc_offset: Asia/Colombo
|
110
|
+
fails "Time.new with a timezone argument subject's class implements .find_timezone method does not call .find_timezone if passed any not string/numeric/timezone timezone argument" # Expected TypeError (/can't convert \w+ into an exact number/) but got: ArgumentError (Opal doesn't support other types for a timezone argument than Integer and String)
|
111
|
+
fails "Time.new with a timezone argument the #abbr method is used by '%Z' in #strftime" # ArgumentError: Opal doesn't support other types for a timezone argument than Integer and String
|
112
|
+
fails "Time.new with a utc_offset argument raises ArgumentError if the String argument is not in an ASCII-compatible encoding" # Expected ArgumentError but no exception was raised (2000-01-01 00:00:00 -0410.000000000000028 was returned)
|
113
|
+
fails "Time.new with a utc_offset argument raises ArgumentError if the month is greater than 12" # Expected ArgumentError (/(mon|argument) out of range/) but got: ArgumentError (month out of range: 13)
|
114
|
+
fails "Time.new with a utc_offset argument raises ArgumentError if the utc_offset argument is greater than or equal to 10e9" # Expected ArgumentError but no exception was raised (2000-01-01 00:00:00 +27777746.66666666418314 was returned)
|
115
|
+
fails "Time.new with a utc_offset argument returns a Time with a UTC offset specified as +HH:MM:SS" # ArgumentError: "+HH:MM", "-HH:MM", "UTC" expected for utc_offset: +05:30:37
|
116
|
+
fails "Time.now :in keyword argument could be UTC offset as a String in '+HH:MM or '-HH:MM' format" # ArgumentError: [Time.now] wrong number of arguments (given 1, expected 0)
|
117
|
+
fails "Time.now :in keyword argument could be UTC offset as a number of seconds" # ArgumentError: [Time.now] wrong number of arguments (given 1, expected 0)
|
118
|
+
fails "Time.now :in keyword argument could be a timezone object" # ArgumentError: [Time.now] wrong number of arguments (given 1, expected 0)
|
119
|
+
fails "Time.now has at least microsecond precision" # NoMethodError: undefined method `nsec' for 2022-12-07 05:21:38 +0100
|
120
|
+
fails "Time.now uses the local timezone" # Expected 3600 == -28800 to be truthy but was false
|
110
121
|
fails "Time.rfc2822 parses RFC-2822 strings" # NoMethodError: undefined method `rfc2822' for Time
|
111
122
|
fails "Time.rfc2822 parses RFC-822 strings" # NoMethodError: undefined method `rfc2822' for Time
|
112
123
|
fails "Time.rfc822 parses RFC-2822 strings" # NoMethodError: undefined method `rfc2822' for Time
|
113
124
|
fails "Time.rfc822 parses RFC-822 strings" # NoMethodError: undefined method `rfc2822' for Time
|
114
|
-
fails "Time.utc handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC
|
125
|
+
fails "Time.utc handles fractional usec close to rounding limit" # NoMethodError: undefined method `nsec' for 2000-01-01 12:30:00 UTC
|
115
126
|
fails "Time.utc raises an ArgumentError for out of range microsecond" # Expected ArgumentError but no exception was raised (2000-01-01 20:15:01 UTC was returned)
|
116
127
|
fails "Time.xmlschema parses ISO-8601 strings" # NoMethodError: undefined method `xmlschema' for Time
|
128
|
+
fails_badly "Time#dst? dst? returns whether time is during daylight saving time" # Expected false == true to be truthy but was false
|
129
|
+
fails_badly "Time#isdst dst? returns whether time is during daylight saving time" # Expected false == true to be truthy but was false
|
130
|
+
fails_badly "Time#strftime with %z formats a local time with positive UTC offset as '+HHMM'" # Expected "+0900" == "+0100" to be truthy but was false
|
131
|
+
fails_badly "Time#yday returns an integer representing the day of the year, 1..366" # Expected 117 == 116 to be truthy but was false
|
117
132
|
end
|
@@ -5,8 +5,8 @@ opal_filter "TracePoint" do
|
|
5
5
|
fails "TracePoint#inspect returns a String showing the event, method, path and line for a :c_call event" # RuntimeError: Only the :class event is supported
|
6
6
|
fails "TracePoint#inspect returns a String showing the event, method, path and line for a :call event" # RuntimeError: Only the :class event is supported
|
7
7
|
fails "TracePoint#inspect returns a String showing the event, method, path and line for a :return event" # RuntimeError: Only the :class event is supported
|
8
|
-
fails "TracePoint#inspect returns a String showing the event, path and line for a :class event"
|
9
|
-
fails "TracePoint#inspect returns a String showing the event, path and line"
|
10
|
-
fails "TracePoint#inspect returns a string containing a human-readable TracePoint status"
|
11
|
-
fails "TracePoint#self return the trace object from event"
|
8
|
+
fails "TracePoint#inspect returns a String showing the event, path and line for a :class event" # Expected "#<TracePoint:0x89c86 @event=\"class\" @block=#<Proc:0x89c88> @trace_object=TracePointSpec::C @trace_evt=\"trace_class\" @tracers_for_evt=\"tracers_for_class\">" == "#<TracePoint:class ruby/core/tracepoint/inspect_spec.rb:87>" to be truthy but was false
|
9
|
+
fails "TracePoint#inspect returns a String showing the event, path and line" # RuntimeError: Only the :class event is supported
|
10
|
+
fails "TracePoint#inspect returns a string containing a human-readable TracePoint status" # RuntimeError: Only the :class event is supported
|
11
|
+
fails "TracePoint#self return the trace object from event" # RuntimeError: Only the :class event is supported
|
12
12
|
end
|
@@ -1,23 +1,38 @@
|
|
1
1
|
# NOTE: run bin/format-filters after changing this file
|
2
2
|
opal_filter "UnboundMethod" do
|
3
|
-
fails "UnboundMethod#==
|
4
|
-
fails "UnboundMethod#==
|
5
|
-
fails "UnboundMethod#==
|
6
|
-
fails "UnboundMethod#== returns true if
|
7
|
-
fails "UnboundMethod
|
8
|
-
fails "UnboundMethod
|
9
|
-
fails "UnboundMethod
|
10
|
-
fails "UnboundMethod#
|
11
|
-
fails "UnboundMethod#
|
3
|
+
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:corelib/class.rb>:40)> to be truthy but was false
|
4
|
+
fails "UnboundMethod#== considers methods through aliasing equal" # Expected #<Method: Class#new (defined in Class in <internal:corelib/class.rb>:40)> == #<Method: Class#n (defined in #<Class:> in <internal:corelib/class.rb>:40)> to be truthy but was false
|
5
|
+
fails "UnboundMethod#== considers methods through visibility change equal" # Expected #<Method: Class#new (defined in Class in <internal:corelib/class.rb>:40)> == #<Method: Class#new (defined in Class in <internal:corelib/class.rb>:40)> to be truthy but was false
|
6
|
+
fails "UnboundMethod#== returns true if both are aliases for a third method" # Expected false == true to be truthy but was false
|
7
|
+
fails "UnboundMethod#== returns true if either is an alias for the other" # Expected false == true to be truthy but was false
|
8
|
+
fails "UnboundMethod#== returns true if objects refer to the same method" # Expected false == true to be truthy but was false
|
9
|
+
fails "UnboundMethod#== returns true if same method is extracted from the same subclass" # Expected false == true to be truthy but was false
|
10
|
+
fails "UnboundMethod#arity for a Method generated by respond_to_missing? returns -1" # Mock 'method arity respond_to_missing' expected to receive respond_to_missing?("any_args") exactly 1 times but received it 0 times
|
11
|
+
fails "UnboundMethod#bind the returned Method is equal to the one directly returned by obj.method" # Expected #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)> == #<Method: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)> to be truthy but was false
|
12
|
+
fails "UnboundMethod#clone returns a copy of the UnboundMethod" # Expected false == true to be truthy but was false
|
13
|
+
fails "UnboundMethod#hash equals a hash of the same method in the superclass" # Expected 13816 == 13814 to be truthy but was false
|
14
|
+
fails "UnboundMethod#hash returns the same value for builtin methods that are eql?" # Expected 13858 == 13860 to be truthy but was false
|
15
|
+
fails "UnboundMethod#hash returns the same value for user methods that are eql?" # Expected 13902 == 13904 to be truthy but was false
|
12
16
|
fails "UnboundMethod#inspect returns a String including all details" # Expected "#<UnboundMethod: UnboundMethodSpecs::Methods#from_mod (defined in UnboundMethodSpecs::Mod in ruby/core/unboundmethod/fixtures/classes.rb:24)>".start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod" to be truthy but was false
|
13
|
-
fails "UnboundMethod#original_name returns the name of the method" # NoMethodError: undefined method `original_name' for #<UnboundMethod: String#upcase (defined in String in corelib/string.rb
|
17
|
+
fails "UnboundMethod#original_name returns the name of the method" # NoMethodError: undefined method `original_name' for #<UnboundMethod: String#upcase (defined in String in <internal:corelib/string.rb>:1685)>
|
14
18
|
fails "UnboundMethod#original_name returns the original name even when aliased twice" # NoMethodError: undefined method `original_name' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
15
19
|
fails "UnboundMethod#original_name returns the original name" # NoMethodError: undefined method `original_name' for #<UnboundMethod: UnboundMethodSpecs::Methods#foo (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:30)>
|
16
|
-
fails "UnboundMethod#
|
17
|
-
fails "UnboundMethod#
|
18
|
-
fails "UnboundMethod#
|
19
|
-
fails "UnboundMethod#
|
20
|
-
fails "UnboundMethod#
|
21
|
-
fails "UnboundMethod#
|
22
|
-
fails "UnboundMethod#
|
20
|
+
fails "UnboundMethod#private? returns false when the method is protected" # NoMethodError: undefined method `private?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_protected_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:58)>
|
21
|
+
fails "UnboundMethod#private? returns false when the method is public" # NoMethodError: undefined method `private?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_public_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:57)>
|
22
|
+
fails "UnboundMethod#private? returns true when the method is private" # NoMethodError: undefined method `private?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_private_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:59)>
|
23
|
+
fails "UnboundMethod#protected? returns false when the method is private" # NoMethodError: undefined method `protected?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_private_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:59)>
|
24
|
+
fails "UnboundMethod#protected? returns false when the method is public" # NoMethodError: undefined method `protected?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_public_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:57)>
|
25
|
+
fails "UnboundMethod#protected? returns true when the method is protected" # NoMethodError: undefined method `protected?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_protected_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:58)>
|
26
|
+
fails "UnboundMethod#public? returns false when the method is private" # NoMethodError: undefined method `public?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_private_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:59)>
|
27
|
+
fails "UnboundMethod#public? returns false when the method is protected" # NoMethodError: undefined method `public?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_protected_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:58)>
|
28
|
+
fails "UnboundMethod#public? returns true when the method is public" # NoMethodError: undefined method `public?' for #<UnboundMethod: UnboundMethodSpecs::Methods#my_public_method (defined in UnboundMethodSpecs::Methods in ruby/core/unboundmethod/fixtures/classes.rb:57)>
|
29
|
+
fails "UnboundMethod#source_location sets the first value to the path of the file in which the method was defined" # Expected "ruby/core/unboundmethod/fixtures/classes.rb" == "./ruby/core/unboundmethod/fixtures/classes.rb" to be truthy but was false
|
30
|
+
fails "UnboundMethod#super_method after aliasing an inherited method returns the expected super_method" # NoMethodError: undefined method `super_method' for #<UnboundMethod: MethodSpecs::InheritedMethods::C#meow (defined in MethodSpecs::InheritedMethods::C in ruby/core/method/fixtures/classes.rb:233)>
|
31
|
+
fails "UnboundMethod#super_method after changing an inherited methods visibility returns the expected super_method" # NoMethodError: undefined method `super_method' for #<UnboundMethod: MethodSpecs::InheritedMethods::C#derp (defined in MethodSpecs::InheritedMethods::B in ruby/core/method/fixtures/classes.rb:233)>
|
32
|
+
fails "UnboundMethod#super_method returns nil when the parent's method is removed" # NoMethodError: undefined method `super_method' for #<UnboundMethod: #<Class:0x4b228>#foo (defined in #<Class:0x4b228> in ruby/core/unboundmethod/super_method_spec.rb:21)>
|
33
|
+
fails "UnboundMethod#super_method returns nil when there's no super method in the parent" # NoMethodError: undefined method `super_method' for #<UnboundMethod: Kernel#method (defined in Kernel in <internal:corelib/kernel.rb>:32)>
|
34
|
+
fails "UnboundMethod#super_method returns the method that would be called by super in the method" # NoMethodError: undefined method `super_method' for #<UnboundMethod: UnboundMethodSpecs::C#overridden (defined in UnboundMethodSpecs::C in ruby/core/unboundmethod/fixtures/classes.rb:91)>
|
35
|
+
fails "UnboundMethod#to_s does not show the defining module if it is the same as the origin" # Expected "#<UnboundMethod:0x10a0c>".start_with? "#<UnboundMethod: UnboundMethodSpecs::A#baz" to be truthy but was false
|
36
|
+
fails "UnboundMethod#to_s returns a String including all details" # Expected "#<UnboundMethod:0x10a92>".start_with? "#<UnboundMethod: UnboundMethodSpecs::Methods(UnboundMethodSpecs::Mod)#from_mod" to be truthy but was false
|
37
|
+
fails "UnboundMethod#to_s the String shows the method name, Module defined in and Module extracted from" # Expected "#<UnboundMethod:0x10a48>" =~ /\bfrom_mod\b/ to be truthy but was nil
|
23
38
|
end
|