Sha256: 14313780b1cf7c35abc976ade5502daa24c8fb0b3fae186948b4101212280b1b

Contents?: true

Size: 342 Bytes

Versions: 4

Compression:

Stored size: 342 Bytes

Contents

module Ahnnotate
  module Refinement
    module YieldSelf
      if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0")
        refine Object do
          def yield_self
            if !block_given?
              return enum_for(:yield_self)
            end

            yield self
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ahnnotate-0.5.1 lib/ahnnotate/refinement/yield_self.rb
ahnnotate-0.5.0 lib/ahnnotate/refinement/yield_self.rb
ahnnotate-0.4.0 lib/ahnnotate/refinement/yield_self.rb
ahnnotate-0.3.0 lib/ahnnotate/refinement/yield_self.rb