Skip to content

Concurrent::Map#each behaves differently in MRI and JRuby #643

@ivoanjo

Description

@ivoanjo
  • Operating system: linux
  • concurrent-ruby version: 1.0.5 and master (tried both)
  • concurrent-ruby-ext installed: no
  • concurrent-ruby-edge used: no

Description:

Concurrent::Map#each when called without a block returns an enumerator on MRI but self on JRuby.

Testcase:

require 'concurrent'
puts "#{RUBY_ENGINE}: #{Concurrent::Map.new.each.inspect}"

Output in MRI 2.4.1:

ruby: #<Enumerator: #<Concurrent::Map:0x0055dd74e2dcc0 entries=0 default_proc=nil>:each_pair>

Output in JRuby 9.1.8.0:

jruby: #<Concurrent::Map:0x00000000000fa0 entries=0 default_proc=nil>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug in the library or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions