Skip to content

Commit 8b7e823

Browse files
committed
be Scala 2.13.3 friendly (Symbol#toString changed)
the old code relied on this assumption: `mySymbol.name == mySymbol.toString.drop(1)` but Scala 2.13.3 is changing Symbol#toString to be e.g. `Symbol(foo)` instead of `'foo` the new code works fine on any Scala version. I cannot see any reason for the old code to be the way it was
1 parent 45e1058 commit 8b7e823

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scalatest/src/main/scala/org/scalatest/PrivateMethodTester.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ trait PrivateMethodTester {
160160
import invocation._
161161

162162
// If 'getMessage passed as methodName, methodNameToInvoke would be "getMessage"
163-
val methodNameToInvoke = methodName.toString.substring(1)
163+
val methodNameToInvoke = methodName.name
164164

165165
def isMethodToInvoke(m: Method) = {
166166

0 commit comments

Comments
 (0)