Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL doesn't add the first line to the history #4714

Closed
scabug opened this issue Jun 18, 2011 · 5 comments
Closed

REPL doesn't add the first line to the history #4714

scabug opened this issue Jun 18, 2011 · 5 comments

Comments

@scabug
Copy link

@scabug scabug commented Jun 18, 2011

REPL is not adding the first line to history:

Welcome to Scala version 2.10.0.r0-b20110601223329 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_23).
Type in expressions to have them evaluated.
Type :help for more information.

scala> 1
res0: Int = 1

scala> 2
res1: Int = 2

scala> :history
1380  for (Regex.Groups(url) <- hrefs) yield url
1381  Source.fromURL
1382  import scala.io.Source
1383  import scala.util.matching.Regex
1384  import scala.util.matching.Regex._
1385  val hrefRegex = new Regex("""\<a.*?href=\"(http:.*?)\".*?\>.*?\</a>""") // no semi-colons
1386  def linksFromUrl(sourceUrl:String) : List[String] = try {  // don't use { } for single-statement methods -- the original was { try { } catch { }
 }
1387       val source = Source fromURL sourceUrl                  // infix notation for infix methods
1388       val hrefs = hrefRegex findAllIn source.mkString       // don't convert from Iterator to List prematurely, for performance reasons
1389       val urls = for (Groups(url) <-hrefs matchData ) yield url          // as described before
1390       urls.toList                                                            // change to list before returning
1391   } catch {
1392       case _ => Nil
1393   }
1394  1
1395  2
1396  :history
1397  exit
1398  2
1399  :history
@scabug
Copy link
Author

@scabug scabug commented Jun 18, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4714?orig=1
Reporter: @dcsobral
Assignee: @JamesIry
Affected Versions: 2.9.1

@scabug
Copy link
Author

@scabug scabug commented Jan 25, 2012

@dcsobral said:
I don't see this issue anymore on trunk. Should it be closed, or does it appear under certain circumstances?

@scabug
Copy link
Author

@scabug scabug commented Jan 25, 2012

@paulp said:
Definitely still happens. It's timing dependent, you have to enter it during a short window right after it starts.

@scabug
Copy link
Author

@scabug scabug commented Aug 14, 2012

@adriaanm said:
This is definitely major, but I wouldn't call it a release-stopper.

@scabug
Copy link
Author

@scabug scabug commented Feb 1, 2013

@scabug scabug closed this Feb 1, 2013
@scabug scabug added this to the 2.10.1 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant