lib/bio/data/codontable.rb in bio-1.4.3.0001 vs lib/bio/data/codontable.rb in bio-1.5.0
- old
+ new
@@ -3,11 +3,10 @@
#
# Copyright:: Copyright (C) 2001, 2004
# Toshiaki Katayama <k@bioruby.org>
# License:: The Ruby License
#
-# $Id:$
#
# == Data source
#
# Data in this class is converted from the NCBI's genetic codes page.
#
@@ -125,10 +124,10 @@
#
# table = Bio::CodonTable[1]
# table.revtrans("A") # => ["gcg", "gct", "gca", "gcc"]
#
def revtrans(aa)
- unless @reverse
+ unless (defined? @reverse) && @reverse
@reverse = {}
@table.each do |k, v|
@reverse[v] ||= []
@reverse[v] << k
end