As I understand it, prior to Ruby 1.9, MRI and YARV were two separate implementations of the Ruby programming language.
This is only half-correct.
It is true that MRI and YARV are two separate implementations of the Ruby Programming Language.
But, it doesn't make sense to talk about YARV "prior to Ruby 1.9". YARV only ever implemented Ruby 1.9, YARV was the first implementation of Ruby 1.9. There was no YARV prior to Ruby 1.9 and there was no Ruby 1.9 prior to YARV.
What exactly changed in Ruby version 1.9? Was MRI abandoned in favour of YARV? Or were the two codebases merged in some way?
YARV only ever implemented Ruby 1.9, it didn't implement Ruby 1.8. MRI only ever implemented Ruby up to and including Ruby 1.8, it didn't implement Ruby 1.9. Thus, when Ruby 1.8 went away, also MRI went away.
YARV did re-use MRI's parser, albeit with the obvious removals, changes, and additions that make Ruby 1.9's syntax different from Ruby 1.8. (It turns out, Ruby's syntax is so insanely complex and woefully underspecified that almost all Ruby implementations re-use MRI's parser in some way. E.g. JRuby's current parser started out as a manual line-by-line port of MRI's. Rubinius went through a lot of different parsers, all of which were derived from MRI's. IronRuby uses a parser which Microsoft licensed from the Ruby.NET creators, which is in turn generated from MRI's parse.y
. And so on …)
I have seen versions of Ruby later than 1.9 referred to as both "MRI" and "YARV" - which of these names is correct (or are they both)?
Neither.
Neither MRI nor YARV are versions of Ruby. They are implementations of Ruby. And MRI never implemented Ruby 1.9, only YARV, IronRuby, MacRuby, JRuby, Rubinius, Opal, Topaz, TruffleRuby, Ruby+OMR, HotRuby, unholy, and MRuby implement(ed) Ruby 1.9 or higher. (I am not sure about MagLev, I think the (abandoned) 2.0 release implemented Ruby 1.9.)
People do sometimes refer to YARV (Yet Another Ruby VM) as "MRI" (Matz's {Ruby | Reference} {Implementation | Interpreter}), but that's wrong: YARV was written by Koichi "ko1" Sasada, not Yukihiro "matz" Matsumoto, so it simply is not "Matz's Ruby Implementation". Matz's current Ruby implementation is MRuby, which is an implementation of the ISO Ruby Programming Language Specification.