delorean_lang 0.1.04 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,12 +76,14 @@ module Delorean
76
76
  elsif obj.instance_of?(NodeCall)
77
77
  return obj.evaluate(attr)
78
78
  elsif obj.instance_of?(Hash)
79
- return obj.member?(attr) ? obj[attr] : obj[attr.to_sym]
79
+ return obj[attr] if obj.member?(attr)
80
+ return attr.is_a?(String) ? obj[attr.to_sym] : nil
80
81
  elsif obj.instance_of?(Class) && (obj < BaseClass)
81
82
  return obj.send((attr + POST).to_sym, _e)
82
83
  end
83
84
 
84
- raise InvalidGetAttribute, "bad attribute lookup '#{attr}' on #{obj}"
85
+ raise InvalidGetAttribute,
86
+ "bad attribute lookup '#{attr}' on <#{obj.class}> #{obj}"
85
87
  end
86
88
 
87
89
  ######################################################################
@@ -1,3 +1,3 @@
1
1
  module Delorean
2
- VERSION = "0.1.04"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delorean_lang
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.04
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-22 00:00:00.000000000 Z
12
+ date: 2013-11-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: treetop