use gsub and a regular expression
first_name = email.gsub(/@[^\s]+/,"")
irb(main):011:0> Benchmark.bmbm do |x|
irb(main):012:1* email = "user@domain.type"
irb(main):013:1> x.report("split"){100.times{|n| first_name = email.split("@")[0]}}
irb(main):014:1> x.report("regex"){100.times{|n| first_name = email.gsub(/@[a-z.]+/,"")}}
irb(main):015:1> end
Rehearsal -----------------------------------------
split   0.000000   0.000000   0.000000 (  0.000000)
regex   0.000000   0.000000   0.000000 (  0.001000)
-------------------------------- total: 0.000000sec
            user     system      total        real
split   0.000000   0.000000   0.000000 (  0.001000)
regex   0.000000   0.000000   0.000000 (  0.000000)
=> [#<Benchmark::Tms:0x490b810 @label="", @stime=0.0, @real=0.00100016593933105, @utime=0.0, @cstime=0.0, @total=0.0, @cutime=0.0>, #<Benchmark::Tms:0x4910bb0 @
label="", @stime=0.0, @real=0.0, @utime=0.0, @cstime=0.0, @total=0.0, @cutime=0.0>]