From bb525f7964c1dd251f0c90ff0780e79645373b33 Mon Sep 17 00:00:00 2001 From: Matt Conway Date: Tue, 3 Sep 2013 07:36:41 -0400 Subject: [PATCH] fix rubinius naming --- .travis.yml | 9 +++++++++ lib/named/naming.rb | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..98bca11 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: ruby + +rvm: + - 1.9.3 + - 2.0.0 + - jruby-19mode + - rbx-19mode + +script: bundle exec rspec spec diff --git a/lib/named/naming.rb b/lib/named/naming.rb index 94d23cb..c72bf52 100644 --- a/lib/named/naming.rb +++ b/lib/named/naming.rb @@ -1,5 +1,15 @@ module Named module Naming - attr_accessor :name + + # rubinius 2.0 doesn't seem to like using attr_accessor for + # name, I'm guessing because of a naming conflict with @name + def name=(n) + @named_name = n + end + + def name + @named_name + end + end end