mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
3f52ef6cfc
When the block passed to Lazy#flat_map returns a non-enumerable value (e.g. an Integer), mruby raised NoMethodError because it unconditionally called #each on the result. CRuby yields non-enumerable values directly. Use respond_to?(:each) to match CRuby behavior: iterate enumerable results, yield non-enumerable results as-is.