diff --git a/.travis.yml b/.travis.yml index 6b5689b..a541dd5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: ruby rvm: + - 2.5.0 - 2.4.0 - 2.3.0 - 2.2.2 diff --git a/lib/flexirest/base_without_validation.rb b/lib/flexirest/base_without_validation.rb index 3d39252..6633fdc 100644 --- a/lib/flexirest/base_without_validation.rb +++ b/lib/flexirest/base_without_validation.rb @@ -13,7 +13,7 @@ class BaseWithoutValidation attr_accessor :_headers instance_methods.each do |m| - next unless %w{display presence load require hash untrust trust freeze method enable_warnings with_warnings suppress capture silence quietly debugger breakpoint}.map(&:to_sym).include? m + next unless %w{display presence load require untrust trust freeze method enable_warnings with_warnings suppress capture silence quietly debugger breakpoint}.map(&:to_sym).include? m undef_method m end diff --git a/spec/lib/ruby_core_spec.rb b/spec/lib/ruby_core_spec.rb new file mode 100644 index 0000000..f596860 --- /dev/null +++ b/spec/lib/ruby_core_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +class EmptyExample < Flexirest::BaseWithoutValidation + whiny_missing true +end + +describe Flexirest::BaseWithoutValidation do + it 'should support hash resolving' do + h = {} + expect{ h[EmptyExample.new] = 'not important' }.to_not raise_error + end +end \ No newline at end of file