Filtering Pinboard API results by tags
The second version is undoubtedly better, more readable, even if you iterate multiple times over the data. 

The problem is: both versions, specially the first, suffer from a common problem: imperative style ("do this, do that"). Are you familiar with the difference between imperative (focus on statements and state change) and functional programming (focus on expressions and immutable data)? it's easy, just try to code without in-place updates (no each, delete_if, bang! methods, ...) and you'll see that you'll end up writing less code, easier to test, to debug and to understand. You'll pay a bit of memory/speed performance, but it's usually worth it.

Now, using a functional approach and taking advantage of existing libraries (uri), that's what I'd write (some details may not be right, but you get the idea):

require 'uri'

def parse(data, filter_tags)
  items, nested_tags, nested_locations = JSON.parse(data).map do |item|
    location = URI.parse(item["l"]).host rescue "URL Parse error"
    tags = item["t"].map(&amp;:strip) - filter_tags
    [item, tags, location]
  end.transpose

  [items, nested_tags.flatten(1).uniq.sort, nested_locations.flatten(1).uniq.sort]
end


More on functional programming with Ruby: http://code.google.com/p/tokland/wiki/RubyFunctionalProgramming