Skip to content


[Truffle] Adding RubyString handling to attr_accesor.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjfish committed Apr 22, 2015
1 parent 75fe358 commit 795d6a1
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -509,8 +509,10 @@ public RubyNilClass attrAccessor(RubyModule module, Object[] args) {

if (arg instanceof RubySymbol) {
accessorName = ((RubySymbol) arg).toString();
} else if (arg instanceof RubyString) {
accessorName = ((RubyString) arg).toString();
} else {
throw new UnsupportedOperationException();
throw new RaiseException(getContext().getCoreLibrary().typeError(" is not a symbol or string", this));

attrAccessor(this, getContext(), sourceSection, module, accessorName);
Expand Down

0 comments on commit 795d6a1

Please sign in to comment.