# NOTE: run bin/format-filters after changing this file opal_filter "Method" do fails "Method#<< does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but no exception was raised (# was returned) fails "Method#<< raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but no exception was raised (# was returned) fails "Method#== missing methods returns true for the same method missing" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#== returns true if a method was defined using the other one" # Expected false to be true fails "Method#== returns true if methods are the same" # Expected false to be true fails "Method#== returns true if the two core methods are aliases" # Expected false to be true fails "Method#== returns true on aliased methods" # Expected false to be true fails "Method#=== for a Method generated by respond_to_missing? does not call the original method name even if it now exists" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing dynamically" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#=== for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#>> composition is a lambda" # Expected #.lambda? to be truthy but was false fails "Method#>> does not try to coerce argument with #to_proc" # Expected TypeError (callable object is expected) but no exception was raised (# was returned) fails "Method#>> raises TypeError if passed not callable object" # Expected TypeError (callable object is expected) but no exception was raised (# was returned) fails "Method#[] for a Method generated by respond_to_missing? does not call the original method name even if it now exists" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing dynamically" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#[] for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#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 fails "Method#call for a Method generated by respond_to_missing? does not call the original method name even if it now exists" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#call for a Method generated by respond_to_missing? invokes method_missing dynamically" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#call for a Method generated by respond_to_missing? invokes method_missing with the method name and the specified arguments" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#call for a Method generated by respond_to_missing? invokes method_missing with the specified arguments and returns the result" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#clone returns a copy of the method" # Expected # == # to be truthy but was false fails "Method#curry with optional arity argument raises ArgumentError when the method requires less arguments than the given arity" # Expected ArgumentError but no exception was raised (# was returned) fails "Method#curry with optional arity argument raises ArgumentError when the method requires more arguments than the given arity" # Expected ArgumentError but no exception was raised (# was returned) fails "Method#define_method when passed a Proc object and a method is defined inside defines the nested method in the default definee where the Proc was created" # Expected #<#:0x51a9c> NOT to have method 'nested_method_in_proc_for_define_method' but it does fails "Method#eql? missing methods returns true for the same method missing" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#eql? returns true if a method was defined using the other one" # Expected false to be true fails "Method#eql? returns true if methods are the same" # Expected false to be true fails "Method#eql? returns true if the two core methods are aliases" # Expected false to be true fails "Method#eql? returns true on aliased methods" # Expected false to be true fails "Method#hash returns the same value for builtin methods that are eql?" # Expected 282998 == 283002 to be truthy but was false fails "Method#hash returns the same value for user methods that are eql?" # Expected 283044 == 283048 to be truthy but was false fails "Method#inspect returns a String containing method arguments" # Expected "#".include? "()" to be truthy but was false fails "Method#inspect returns a String containing the Module containing the method if object has a singleton class but method is not defined in the singleton class" # Expected "#".start_with? "#> in ruby/core/method/shared/to_s.rb:74)>".start_with? "#.bar" to be truthy but was false fails "Method#inspect returns a String including all details" # Expected "#".start_with? "#:464)>".start_with? "#(Module)#include" to be truthy but was false fails "Method#name for a Method generated by respond_to_missing? returns the name passed to respond_to_missing?" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#original_name returns the name of the method" # NoMethodError: undefined method `original_name' for #:1685)> fails "Method#original_name returns the original name even when aliased twice" # NoMethodError: undefined method `original_name' for # fails "Method#original_name returns the original name when aliased" # NoMethodError: undefined method `original_name' for # fails "Method#owner for a Method generated by respond_to_missing? returns the owner of the method" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#parameters returns [[:req]] for each parameter for core methods with fixed-length argument lists" # Expected [["req", "other"]] == [["req"]] to be truthy but was false fails "Method#parameters returns [[:rest]] for a Method generated by respond_to_missing?" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#parameters returns [[:rest]] for core methods with variable-length argument lists" # NameError: undefined method `delete!' for class `String' fails "Method#parameters returns [[:rest]] or [[:opt]] for core methods with optional arguments" # Expected [[["rest"]], [["opt"]]] to include [["opt", "count"]] fails "Method#receiver for a Method generated by respond_to_missing? returns the receiver of the method" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#source_location for a Method generated by respond_to_missing? returns nil" # NameError: undefined method `handled_via_method_missing' for class `MethodSpecs::Methods' fails "Method#source_location sets the first value to the path of the file in which the method was defined" # Expected "ruby/core/method/fixtures/classes.rb" == "./ruby/core/method/fixtures/classes.rb" to be truthy but was false fails "Method#source_location works for eval with a given line" # Expected ["(eval)", 0] == ["foo", 100] to be truthy but was false fails "Method#super_method after aliasing an inherited method returns the expected super_method" # NoMethodError: undefined method `super_method' for # fails "Method#super_method after changing an inherited methods visibility returns the expected super_method" # NoMethodError: undefined method `super_method' for # fails "Method#super_method returns nil when the parent's method is removed" # NoMethodError: undefined method `super_method' for ##overridden (defined in # in ruby/core/method/super_method_spec.rb:36)> fails "Method#super_method returns nil when there's no super method in the parent" # NoMethodError: undefined method `super_method' for #:32)> fails "Method#super_method returns the method that would be called by super in the method" # NoMethodError: undefined method `super_method' for # fails "Method#to_proc returns a proc that can be used by define_method" # Exception: Cannot create property '$$meta' on string 'test' fails "Method#to_proc returns a proc that can receive a block" # LocalJumpError: no block given fails "Method#to_proc returns a proc whose binding has the same receiver as the method" # Expected # == nil to be truthy but was false fails "Method#to_s does not show the defining module if it is the same as the receiver class" # Expected "#".start_with? "#".include? "()" to be truthy but was false fails "Method#to_s returns a String containing the Module containing the method if object has a singleton class but method is not defined in the singleton class" # Expected "#".start_with? "#" =~ /MethodSpecs::MyMod/ to be truthy but was nil fails "Method#to_s returns a String containing the Module the method is referenced from" # Expected "#" =~ /MethodSpecs::MySub/ to be truthy but was nil fails "Method#to_s returns a String containing the method name" # Expected "#" =~ /\#bar/ to be truthy but was nil fails "Method#to_s returns a String containing the singleton class if method is defined in the singleton class" # Expected "#".start_with? "#.bar" to be truthy but was false fails "Method#to_s returns a String including all details" # Expected "#".start_with? "#:464)>".start_with? "#(Module)#include" to be truthy but was false fails "Method#unbind keeps the origin singleton class if there is one" # Expected "#> in ruby/core/method/unbind_spec.rb:37)>".start_with? "#>#foo" to be truthy but was false fails "Method#unbind rebinding UnboundMethod to Method's obj produces exactly equivalent Methods" # Expected # == # to be truthy but was false fails_badly "Method#define_method when passed a block behaves exactly like a lambda for break" # Exception: unexpected break end