Skip to content

Commit 6c7d440

Browse files
committed
[GR-17818] List members for String and Symbol.
PullRequest: truffleruby/1171
2 parents 123bc59 + de3f986 commit 6c7d440

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Bug fixes:
3535
* Fixed issue in `ConditionVariable#wait` that could lose a `ConditionVariable#signal`.
3636
* Do not leak TruffleRuby specific method Array#swap (#1816)
3737
* Fixed `#inspect` on broken UTF-8 sequences (#1842, @chrisseaton).
38+
* `Truffle::Interop.keys` should report methods of String and Symbol (#1817)
3839

3940
Compatibility:
4041

src/main/ruby/truffleruby/core/truffle/interop.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def self.object_keys(object, internal)
4444
# TODO (pitr-ch 23-May-2019): add assert that called methods are in members list
4545
if object.is_a?(Hash)
4646
keys = object.keys # FIXME (pitr-ch 11-May-2019): no return methods
47-
elsif object.respond_to?(:[]) && !object.is_a?(Array)
47+
elsif object.respond_to?(:[]) && !object.is_a?(Array) && !object.is_a?(String) && !object.is_a?(Symbol)
4848
# FIXME (pitr-ch 11-May-2019): remove the branch
4949
keys = []
5050
else

0 commit comments

Comments
 (0)